Class: VORuby::ADQL::V1_0::OrderOption
- Inherits:
-
Object
- Object
- VORuby::ADQL::V1_0::OrderOption
- Includes:
- SerializableToXml
- Defined in:
- lib/voruby/adql/1.0/adql.rb
Overview
Option for setting the direction for Order By
Instance Attribute Summary collapse
-
#direction ⇒ Object
Returns the value of attribute direction.
Class Method Summary collapse
Instance Method Summary collapse
- #==(o) ⇒ Object
-
#initialize(direction) ⇒ OrderOption
constructor
A new instance of OrderOption.
- #to_s ⇒ Object
- #to_xml(name = nil) ⇒ Object
Methods included from SerializableToXml
Constructor Details
#initialize(direction) ⇒ OrderOption
Returns a new instance of OrderOption.
1896 1897 1898 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1896 def initialize(direction) self.direction = direction end |
Instance Attribute Details
#direction ⇒ Object
Returns the value of attribute direction.
1892 1893 1894 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1892 def direction @direction end |
Class Method Details
.from_xml(xml) ⇒ Object
1923 1924 1925 1926 1927 1928 1929 1930 1931 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1923 def self.from_xml(xml) root = element_from(xml) self.new( OrderDirection.new( root.attributes.get_attribute_ns(obj_ns.uri, 'Direction').value ) ) end |
.xml_type ⇒ Object
1894 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1894 def self.xml_type; 'orderOptionType' end |
Instance Method Details
#==(o) ⇒ Object
1909 1910 1911 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1909 def ==(o) self.direction == o.direction end |
#to_s ⇒ Object
1913 1914 1915 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1913 def to_s self.direction.to_s end |
#to_xml(name = nil) ⇒ Object
1917 1918 1919 1920 1921 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1917 def to_xml(name=nil) el = element_root(name) el.attributes["#{obj_ns.prefix}:Direction"] = self.direction.to_s el end |