Class: VORuby::VOTable::V1_1::Values
- Inherits:
-
Base
- Object
- XML::Object::Base
- Base
- VORuby::VOTable::V1_1::Values
- Defined in:
- lib/voruby/votable/1.1/votable.rb
Overview
Holds subsidiary information about the domain of the data.
Constant Summary collapse
- ELEMENT_NAME =
'VALUES'
Instance Attribute Summary
Attributes inherited from XML::Object::Base
Class Method Summary collapse
Instance Method Summary collapse
- #id ⇒ Object
- #id=(i) ⇒ Object
-
#initialize(defn = nil) ⇒ Values
constructor
Create some new subsidiary information about the domain.
-
#max ⇒ Object
Retrieve the maximum of the value (Max).
-
#max=(m) ⇒ Object
Set the maximum of the value (Max).
-
#min ⇒ Object
Retrieve the minimum of the value (Min).
-
#min=(m) ⇒ Object
Set the minimum of the value (Min).
- #null ⇒ Object
-
#null=(n) ⇒ Object
Set the value that is used to specify non-existent data.
-
#options ⇒ Object
Retrieve the possible values (Option) the column can take on.
-
#options=(opts) ⇒ Object
Set the possible values the column can take on.
- #ref ⇒ Object
- #ref=(r) ⇒ Object
- #type ⇒ Object
-
#type=(t) ⇒ Object
Set the scope of values present.
Methods inherited from Base
#==, element_name, #get_element, #xpath_for
Methods inherited from XML::Object::Base
#==, element_name, from_file, #to_s
Constructor Details
#initialize(defn = nil) ⇒ Values
1278 1279 1280 1281 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1278 def initialize(defn=nil) super(defn) self.type = 'legal' if !self.type end |
Class Method Details
.serialization_order ⇒ Object
1265 1266 1267 1268 1269 1270 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1265 def self.serialization_order [ :min, :max, :options, :id, :type, :null, :ref ] end |
Instance Method Details
#id ⇒ Object
1283 1284 1285 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1283 def id self.node['ID'] end |
#id=(i) ⇒ Object
1287 1288 1289 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1287 def id=(i) @node['ID'] = i.to_s end |
#max ⇒ Object
Retrieve the maximum of the value (Max).
1321 1322 1323 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1321 def max get_element(Max) end |
#max=(m) ⇒ Object
Set the maximum of the value (Max).
1326 1327 1328 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1326 def max=(m) set_element(Max, m) end |
#min ⇒ Object
Retrieve the minimum of the value (Min).
1331 1332 1333 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1331 def min get_element(Min) end |
#min=(m) ⇒ Object
Set the minimum of the value (Min).
1336 1337 1338 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1336 def min=(m) set_element(Min, m) end |
#null ⇒ Object
1302 1303 1304 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1302 def null self.node['null'] end |
#null=(n) ⇒ Object
Set the value that is used to specify non-existent data.
1308 1309 1310 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1308 def null=(n) @node['null'] = n.to_s end |
#options ⇒ Object
Retrieve the possible values (Option) the column can take on. Returns a HomogeneousNodeList object.
1342 1343 1344 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1342 def HomogeneousNodeList.new(self.node, xpath_for(Option), Option) end |
#options=(opts) ⇒ Object
Set the possible values the column can take on.
values.options = [Option.new(), ...]
1348 1349 1350 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1348 def (opts) self..replace(opts) end |
#ref ⇒ Object
1312 1313 1314 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1312 def ref self.node['ref'] end |
#ref=(r) ⇒ Object
1316 1317 1318 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1316 def ref=(r) @node['ref'] = r.to_s end |
#type ⇒ Object
1291 1292 1293 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1291 def type self.node['type'] end |
#type=(t) ⇒ Object
Set the scope of values present. Possible values are: legal, actual. Defaults to legal.
1298 1299 1300 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1298 def type=(t) @node['type'] = t.to_s end |