Class: RubyLexer::DecoratorToken
- Inherits:
-
SubitemToken
- Object
- Token
- SubitemToken
- RubyLexer::DecoratorToken
- Defined in:
- lib/rubylexer/token.rb
Overview
Instance Attribute Summary
Attributes inherited from SubitemToken
Attributes inherited from Token
#allow_ooo_offset, #as, #ident, #offset, #tag
Instance Method Summary collapse
-
#initialize(ident, subitem) ⇒ DecoratorToken
constructor
A new instance of DecoratorToken.
-
#needs_value? ⇒ Boolean
alias to_s ident #parent has right implementation of to_s…
- #value ⇒ Object
- #value=(v) ⇒ Object
Methods inherited from SubitemToken
Methods inherited from Token
#error, #has_no_block?, #to_s, #ws_munge
Constructor Details
#initialize(ident, subitem) ⇒ DecoratorToken
Returns a new instance of DecoratorToken.
674 675 676 677 678 679 |
# File 'lib/rubylexer/token.rb', line 674 def initialize(ident,subitem) super '^'+ident,subitem @subitem=@subitem.to_s #why to_s? #@char='^' @char2='=' end |
Instance Method Details
#needs_value? ⇒ Boolean
alias to_s ident #parent has right implementation of to_s… i think
682 |
# File 'lib/rubylexer/token.rb', line 682 def needs_value?() @subitem.nil? end |
#value ⇒ Object
685 |
# File 'lib/rubylexer/token.rb', line 685 def value() @subitem end |
#value=(v) ⇒ Object
684 |
# File 'lib/rubylexer/token.rb', line 684 def value=(v) @subitem=v end |