Class: VORuby::VOTable::V1_1::Info
- Inherits:
-
Base
show all
- Defined in:
- lib/voruby/votable/1.1/votable.rb
Overview
Constant Summary
collapse
- ELEMENT_NAME =
'INFO'
Instance Attribute Summary
#node
Instance Method Summary
collapse
Methods inherited from Base
#==, element_name, #get_element, #xpath_for
#==, element_name, from_file, #to_s
Constructor Details
#initialize(defn = nil) ⇒ Info
Create a new name-value pair.
info = Info.new(:name => 'history', :value => 'my first observation')
480
481
482
|
# File 'lib/voruby/votable/1.1/votable.rb', line 480
def initialize(defn=nil)
super(defn)
end
|
Instance Method Details
#id ⇒ Object
484
485
486
|
# File 'lib/voruby/votable/1.1/votable.rb', line 484
def id
self.node['ID']
end
|
#id=(i) ⇒ Object
488
489
490
|
# File 'lib/voruby/votable/1.1/votable.rb', line 488
def id=(i)
@node['ID'] = i.to_s
end
|
#name ⇒ Object
492
493
494
|
# File 'lib/voruby/votable/1.1/votable.rb', line 492
def name
self.node['name']
end
|
#name=(n) ⇒ Object
496
497
498
|
# File 'lib/voruby/votable/1.1/votable.rb', line 496
def name=(n)
@node['name'] = n.to_s
end
|
#value ⇒ Object
500
501
502
|
# File 'lib/voruby/votable/1.1/votable.rb', line 500
def value
self.node['value']
end
|
#value=(v) ⇒ Object
504
505
506
|
# File 'lib/voruby/votable/1.1/votable.rb', line 504
def value=(v)
@node['value'] = v.to_s
end
|