Class: VORuby::ADQL::ClosedSearch

Inherits:
Search show all
Defined in:
lib/voruby/adql/adql.rb,
lib/voruby/adql/transforms.rb

Overview

Represents expressions like (A).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(condition) ⇒ ClosedSearch

Returns a new instance of ClosedSearch.



1355
1356
1357
# File 'lib/voruby/adql/adql.rb', line 1355

def initialize(condition)
	self.condition = condition
end

Instance Attribute Details

#conditionObject

Returns the value of attribute condition.



1353
1354
1355
# File 'lib/voruby/adql/adql.rb', line 1353

def condition
  @condition
end

Class Method Details

.from_xml(node) ⇒ Object



1368
1369
1370
1371
1372
# File 'lib/voruby/adql/adql.rb', line 1368

def self.from_xml(node)
  cond_node = REXML::XPath.first(node, 'Condition')
  cond = Condition.from_xml(cond_node)
  return ClosedSearch.new(cond)
end

Instance Method Details

#to_adqlsObject



287
288
289
# File 'lib/voruby/adql/transforms.rb', line 287

def to_adqls
	"(#{self.condition.to_adqls})"
end

#to_sObject



1364
1365
1366
# File 'lib/voruby/adql/adql.rb', line 1364

def to_s
	"{condition=#{self.condition}}"
end