Class: VORuby::VOTable::V1_0::Info
- Inherits:
-
Base
show all
- Defined in:
- lib/voruby/votable/1.0/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')
464
465
466
|
# File 'lib/voruby/votable/1.0/votable.rb', line 464
def initialize(defn=nil)
super(defn)
end
|
Instance Method Details
#id ⇒ Object
468
469
470
|
# File 'lib/voruby/votable/1.0/votable.rb', line 468
def id
self.node['ID']
end
|
#id=(i) ⇒ Object
472
473
474
|
# File 'lib/voruby/votable/1.0/votable.rb', line 472
def id=(i)
@node['ID'] = i.to_s
end
|
#name ⇒ Object
476
477
478
|
# File 'lib/voruby/votable/1.0/votable.rb', line 476
def name
self.node['name']
end
|
#name=(n) ⇒ Object
480
481
482
|
# File 'lib/voruby/votable/1.0/votable.rb', line 480
def name=(n)
@node['name'] = n.to_s
end
|
#value ⇒ Object
484
485
486
|
# File 'lib/voruby/votable/1.0/votable.rb', line 484
def value
self.node['value']
end
|
#value=(v) ⇒ Object
488
489
490
|
# File 'lib/voruby/votable/1.0/votable.rb', line 488
def value=(v)
@node['value'] = v
end
|