Class: VORuby::VOTables::VOTable::Meta::FieldRef
- Defined in:
- lib/voruby/votables/meta.rb,
lib/voruby/votables/transforms.rb,
lib/voruby/votables/rexml_parser.rb,
lib/voruby/votables/libxml_parser.rb
Overview
A class representing the standard VOTable FIELDref element.
Instance Attribute Summary collapse
-
#ref ⇒ Object
readonly
Returns the value of attribute ref.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(ref = nil) ⇒ FieldRef
constructor
- ref:
-
A reference to a FIELD element.
- #to_s ⇒ Object
Constructor Details
#initialize(ref = nil) ⇒ FieldRef
- ref:
-
A reference to a FIELD element.
193 194 195 196 197 |
# File 'lib/voruby/votables/meta.rb', line 193 def initialize(ref=nil) raise "Field reference must define a reference" if ref == nil @ref = ref end |
Instance Attribute Details
#ref ⇒ Object (readonly)
Returns the value of attribute ref.
189 190 191 |
# File 'lib/voruby/votables/meta.rb', line 189 def ref @ref end |
Class Method Details
.from_soap_obj(mfieldrefs) ⇒ Object
189 190 191 192 193 194 195 196 197 198 199 200 |
# File 'lib/voruby/votables/transforms.rb', line 189 def self.from_soap_obj(mfieldrefs) mfieldrefs = [mfieldrefs] if !mfieldrefs.respond_to?(:each) fieldrefs = [] mfieldrefs.each do |mfieldref| fieldrefs.push(FieldRef.new( VOTable::_find_attr_value(mfieldref.__xmlattr, 'ref') )) end fieldrefs end |
.from_xml(node) ⇒ Object
78 79 80 81 82 |
# File 'lib/voruby/votables/rexml_parser.rb', line 78 def self.from_xml(node) ref = node.attributes['ref'] if node.attributes['ref'] return self.new(ref) end |
Instance Method Details
#to_s ⇒ Object
199 200 201 |
# File 'lib/voruby/votables/meta.rb', line 199 def to_s "{#{@ref}}" end |