Class: VORuby::ADQL::V1_0::ClosedSearch
- Defined in:
- lib/voruby/adql/1.0/adql.rb
Overview
Represents expressions like (A)
Instance Attribute Summary collapse
-
#condition ⇒ Object
Returns the value of attribute condition.
Class Method Summary collapse
Instance Method Summary collapse
- #==(s) ⇒ Object
-
#initialize(condition) ⇒ ClosedSearch
constructor
A new instance of ClosedSearch.
- #to_s ⇒ Object
- #to_xml(name = nil) ⇒ Object
Methods included from SerializableToXml
Constructor Details
#initialize(condition) ⇒ ClosedSearch
Returns a new instance of ClosedSearch.
1292 1293 1294 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1292 def initialize(condition) self.condition = condition end |
Instance Attribute Details
#condition ⇒ Object
Returns the value of attribute condition.
1288 1289 1290 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1288 def condition @condition end |
Class Method Details
.from_xml(xml) ⇒ Object
1317 1318 1319 1320 1321 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1317 def self.from_xml(xml) root = element_from(xml) self.new(xml_to_obj(REXML::XPath.first(root, 'x:Condition', {'x' => obj_ns.uri}))) end |
.xml_type ⇒ Object
1290 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1290 def self.xml_type; 'closedSearchType' end |
Instance Method Details
#==(s) ⇒ Object
1302 1303 1304 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1302 def ==(s) self.condition == s.condition end |
#to_s ⇒ Object
1306 1307 1308 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1306 def to_s "(#{self.condition})" end |
#to_xml(name = nil) ⇒ Object
1310 1311 1312 1313 1314 1315 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1310 def to_xml(name=nil) el = super(name) el.add_element(self.condition.to_xml('Condition')) collapse_namespaces(el) el end |