Class: Keyword::KWtable
- Inherits:
-
Object
- Object
- Keyword::KWtable
- Defined in:
- lib/ruby_parser_extras.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
- #id0 ⇒ Object
- #id1 ⇒ Object
-
#initialize(name, id = [], state = nil) ⇒ KWtable
constructor
A new instance of KWtable.
Constructor Details
#initialize(name, id = [], state = nil) ⇒ KWtable
Returns a new instance of KWtable.
451 452 453 454 455 |
# File 'lib/ruby_parser_extras.rb', line 451 def initialize(name, id=[], state=nil) @name = name @id = id @state = state end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
450 451 452 |
# File 'lib/ruby_parser_extras.rb', line 450 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
450 451 452 |
# File 'lib/ruby_parser_extras.rb', line 450 def name @name end |
#state ⇒ Object
Returns the value of attribute state.
450 451 452 |
# File 'lib/ruby_parser_extras.rb', line 450 def state @state end |
Instance Method Details
#id0 ⇒ Object
457 458 459 |
# File 'lib/ruby_parser_extras.rb', line 457 def id0 self.id.first end |
#id1 ⇒ Object
461 462 463 |
# File 'lib/ruby_parser_extras.rb', line 461 def id1 self.id.last end |