Class: VORuby::VOTable::V1_1::Min
- Inherits:
-
Base
- Object
- XML::Object::Base
- Base
- VORuby::VOTable::V1_1::Min
- Defined in:
- lib/voruby/votable/1.1/votable.rb
Overview
A minimum value a column can take on.
Constant Summary collapse
- ELEMENT_NAME =
'MIN'
Instance Attribute Summary
Attributes inherited from XML::Object::Base
Instance Method Summary collapse
- #inclusive ⇒ Object
-
#inclusive=(i) ⇒ Object
Set whether the minimum value is inclusive or not.
-
#inclusive? ⇒ Boolean
Check whether the minimum value is inclusive or not.
-
#initialize(defn = nil) ⇒ Min
constructor
Create a new minimum 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
1381 1382 1383 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1381 def inclusive self.node['inclusive'] end |
#inclusive=(i) ⇒ Object
Set whether the minimum value is inclusive or not. Takes a boolean value or a yes/no string.
min.inclusive = false # or...
min.inclusive = 'no'
1395 1396 1397 1398 1399 1400 1401 1402 1403 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1395 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 minimum value is inclusive or not. By default, the minimum is inclusive.
1387 1388 1389 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1387 def inclusive? self.node['inclusive'] == 'yes' end |
#value ⇒ Object
1373 1374 1375 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1373 def value self.node['value'] end |
#value=(v) ⇒ Object
1377 1378 1379 |
# File 'lib/voruby/votable/1.1/votable.rb', line 1377 def value=(v) @node['value'] = v.to_s end |