Class: VORuby::ADQL::V1_0::SelectionLimit
- Inherits:
-
Object
- Object
- VORuby::ADQL::V1_0::SelectionLimit
- Includes:
- SerializableToXml
- Defined in:
- lib/voruby/adql/1.0/adql.rb
Overview
Represents the TOP part of a query
Instance Attribute Summary collapse
-
#top ⇒ Object
Returns the value of attribute top.
Class Method Summary collapse
Instance Method Summary collapse
- #==(l) ⇒ Object
-
#initialize(top) ⇒ SelectionLimit
constructor
A new instance of SelectionLimit.
- #to_s ⇒ Object
- #to_xml(name = nil) ⇒ Object
Methods included from SerializableToXml
Constructor Details
#initialize(top) ⇒ SelectionLimit
Returns a new instance of SelectionLimit.
1806 1807 1808 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1806 def initialize(top) self.top = top end |
Instance Attribute Details
#top ⇒ Object
Returns the value of attribute top.
1802 1803 1804 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1802 def top @top end |
Class Method Details
.from_xml(xml) ⇒ Object
1829 1830 1831 1832 1833 1834 1835 1836 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1829 def self.from_xml(xml) root = element_from(xml) self.new( Integer( root.attributes.get_attribute_ns(obj_ns.uri, 'Top').value ) ) end |
.xml_type ⇒ Object
1804 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1804 def self.xml_type; 'selectionLimitType' end |
Instance Method Details
#==(l) ⇒ Object
1815 1816 1817 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1815 def ==(l) self.top == l.top end |
#to_s ⇒ Object
1819 1820 1821 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1819 def to_s "TOP #{self.top}" end |
#to_xml(name = nil) ⇒ Object
1823 1824 1825 1826 1827 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1823 def to_xml(name=nil) el = element_root(name) el.attributes["#{obj_ns.prefix}:Top"] = self.top.to_s el end |