Parent

Class/Module Index [+]

Quicksearch

RKelly::Token

Attributes

name[RW]
range[RW]
transformer[RW]
value[RW]

Public Class Methods

new(name, value, &transformer) click to toggle source
# File lib/rkelly/token.rb, line 4
def initialize(name, value, &transformer)
  @name         = name
  @value        = value
  @transformer  = transformer
end

Public Instance Methods

line() click to toggle source

For backwards compatibility

# File lib/rkelly/token.rb, line 11
def line
  @range.from.line
end
to_racc_token() click to toggle source
# File lib/rkelly/token.rb, line 15
def to_racc_token
  return transformer.call(name, value) if transformer
  [name, value]
end
to_s() click to toggle source
# File lib/rkelly/token.rb, line 20
def to_s
  return "#{self.name}: #{self.value}"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.