Class: Keyword::KWtable

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_parser_extras.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject

Returns the value of attribute id.



450
451
452
# File 'lib/ruby_parser_extras.rb', line 450

def id
  @id
end

#nameObject

Returns the value of attribute name.



450
451
452
# File 'lib/ruby_parser_extras.rb', line 450

def name
  @name
end

#stateObject

Returns the value of attribute state.



450
451
452
# File 'lib/ruby_parser_extras.rb', line 450

def state
  @state
end

Instance Method Details

#id0Object



457
458
459
# File 'lib/ruby_parser_extras.rb', line 457

def id0
  self.id.first
end

#id1Object



461
462
463
# File 'lib/ruby_parser_extras.rb', line 461

def id1
  self.id.last
end