Class: VORuby::VOTable::V1_0::Min
- Inherits:
-
Base
- Object
- XML::Object::Base
- Base
- VORuby::VOTable::V1_0::Min
- Defined in:
- lib/voruby/votable/1.0/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
1301 1302 1303 |
# File 'lib/voruby/votable/1.0/votable.rb', line 1301 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'
1315 1316 1317 1318 1319 1320 1321 1322 1323 |
# File 'lib/voruby/votable/1.0/votable.rb', line 1315 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.
1307 1308 1309 |
# File 'lib/voruby/votable/1.0/votable.rb', line 1307 def inclusive? self.node['inclusive'] == 'yes' end |
#value ⇒ Object
1293 1294 1295 |
# File 'lib/voruby/votable/1.0/votable.rb', line 1293 def value self.node['value'] end |
#value=(v) ⇒ Object
1297 1298 1299 |
# File 'lib/voruby/votable/1.0/votable.rb', line 1297 def value=(v) @node['value'] = v.to_s end |