Class: VORuby::VOTable::V1_0::Max
- Inherits:
-
Base
- Object
- XML::Object::Base
- Base
- VORuby::VOTable::V1_0::Max
- Defined in:
- lib/voruby/votable/1.0/votable.rb
Overview
The maximum value a column may take on.
Constant Summary collapse
- ELEMENT_NAME =
'MAX'
Instance Attribute Summary
Attributes inherited from XML::Object::Base
Instance Method Summary collapse
- #inclusive ⇒ Object
-
#inclusive=(i) ⇒ Object
Set whether the maximum value is inclusive or not.
-
#inclusive? ⇒ Boolean
Check whether the maximum value is inclusive or not.
-
#initialize(defn = nil) ⇒ Max
constructor
Create a new maximum value for a column.
- #value ⇒ Object
- #value=(v) ⇒ 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
#inclusive ⇒ Object
1351 1352 1353 |
# File 'lib/voruby/votable/1.0/votable.rb', line 1351 def inclusive self.node['inclusive'] end |
#inclusive=(i) ⇒ Object
Set whether the maximum value is inclusive or not. Takes a boolean value or a yes/no string.
max.inclusive = false # or...
max.inclusive = 'no'
1365 1366 1367 1368 1369 1370 1371 1372 1373 |
# File 'lib/voruby/votable/1.0/votable.rb', line 1365 def inclusive=(i) if i.is_a?(TrueClass) @node['inclusive'] = 'yes' elsif i.is_a?(FalseClass) @node['inclusive'] = 'no' else @node['inclusive'] = i.to_s end end |
#inclusive? ⇒ Boolean
Check whether the maximum value is inclusive or not. By default, the maximum is inclusive.
1357 1358 1359 |
# File 'lib/voruby/votable/1.0/votable.rb', line 1357 def inclusive? self.node['inclusive'] == 'yes' end |
#value ⇒ Object
1343 1344 1345 |
# File 'lib/voruby/votable/1.0/votable.rb', line 1343 def value self.node['value'] end |
#value=(v) ⇒ Object
1347 1348 1349 |
# File 'lib/voruby/votable/1.0/votable.rb', line 1347 def value=(v) @node['value'] = v.to_s end |