aboutsummaryrefslogtreecommitdiffstats
path: root/script/performance/benchmarker
blob: c2441c9414896185555e82b9f80e5a926505bc14 (plain)
1
2
3
4
5
#!/usr/bin/ruby

#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot.rb'
require 'commands/performance/benchmarker'
nd-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
require 'rdoc/code_object'

##
# Represent an alias, which is an old_name/new_name pair associated with a
# particular context

class RDoc::Alias < RDoc::CodeObject

  ##
  # Allow comments to be overridden

  attr_writer :comment

  ##
  # Aliased name

  attr_accessor :new_name

  ##
  # Aliasee's name

  attr_accessor :old_name

  ##
  # Source file token stream

  attr_accessor :text

  ##
  # Creates a new Alias with a token stream of +text+ that aliases +old_name+
  # to +new_name+ and has +comment+

  def initialize(text, old_name, new_name, comment)
    super()
    @text = text
    @old_name = old_name
    @new_name = new_name
    self.comment = comment
  end

  def inspect # :nodoc:
    "#<%s:0x%x %s.alias_method %s, %s>" % [
      self.class, object_id,
      parent.name, @old_name, @new_name,
    ]
  end

  def to_s # :nodoc:
    "alias: #{self.old_name} -> #{self.new_name}\n#{self.comment}"
  end

end