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.



1376
1377
1378
# File 'lib/voruby/adql/adql.rb', line 1376

def initialize(condition)
	self.condition = condition
end

Instance Attribute Details

#conditionObject

Returns the value of attribute condition.



1374
1375
1376
# File 'lib/voruby/adql/adql.rb', line 1374

def condition
  @condition
end

Class Method Details

.from_xml(node) ⇒ Object



1389
1390
1391
1392
1393
# File 'lib/voruby/adql/adql.rb', line 1389

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



1385
1386
1387
# File 'lib/voruby/adql/adql.rb', line 1385

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