Class: TokenParser::UnitToken
Overview
Unit Token Definition Class
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#parser ⇒ Object
Returns the value of attribute parser.
-
#start(match = nil) ⇒ Object
def raw? ; @type == :raw ; end def normal? ; @type != :raw && @type != :unit ; end.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(key, start = nil) ⇒ UnitToken
constructor
A new instance of UnitToken.
- #unit? ⇒ Boolean
Constructor Details
#initialize(key, start = nil) ⇒ UnitToken
Returns a new instance of UnitToken.
362 363 364 365 |
# File 'lib/mega/tokenparser.rb', line 362 def initialize( key, start=nil ) @key = key @start = start end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
359 360 361 |
# File 'lib/mega/tokenparser.rb', line 359 def key @key end |
#parser ⇒ Object
Returns the value of attribute parser.
360 361 362 |
# File 'lib/mega/tokenparser.rb', line 360 def parser @parser end |
#start(match = nil) ⇒ Object
def raw? ; @type == :raw ; end def normal? ; @type != :raw && @type != :unit ; end
371 372 373 |
# File 'lib/mega/tokenparser.rb', line 371 def start @start end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
359 360 361 |
# File 'lib/mega/tokenparser.rb', line 359 def type @type end |
Instance Method Details
#unit? ⇒ Boolean
367 |
# File 'lib/mega/tokenparser.rb', line 367 def unit? ; true ; end |