Class: VORuby::VOTable::V1_1::ParamRef
- Inherits:
-
Base
- Object
- XML::Object::Base
- Base
- VORuby::VOTable::V1_1::ParamRef
- Defined in:
- lib/voruby/votable/1.1/votable.rb
Overview
A reference to an existing Param.
Constant Summary collapse
- ELEMENT_NAME =
'PARAMref'
Instance Attribute Summary
Attributes inherited from XML::Object::Base
Instance Method Summary collapse
-
#initialize(defn = nil) ⇒ ParamRef
constructor
Create an new parameter reference.
-
#param ⇒ Object
Retrieve the parameter (Param) associated with the reference.
- #ref ⇒ Object
- #ref=(r) ⇒ Object
Methods inherited from Base
#==, element_name, #get_element, #xpath_for
Methods inherited from XML::Object::Base
#==, element_name, from_file, #to_s
Constructor Details
Instance Method Details
#param ⇒ Object
Retrieve the parameter (Param) associated with the reference.
1697 1698 1699 1700 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1697 def param param_node = self.node.find_first("ancestor::*/PARAM[@ID='#{self.ref}']") param_node ? Param.new(param_node) : nil end |
#ref ⇒ Object
1688 1689 1690 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1688 def ref self.node['ref'] end |
#ref=(r) ⇒ Object
1692 1693 1694 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1692 def ref=(r) @node['ref'] = r.to_s end |