Class: VORuby::ADQL::ClosedExpr
- Inherits:
-
ScalarExpression
- Object
- SelectionItem
- ScalarExpression
- VORuby::ADQL::ClosedExpr
- Defined in:
- lib/voruby/adql/adql.rb,
lib/voruby/adql/transforms.rb
Overview
Represents an expression inside a bracket.
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(val) ⇒ ClosedExpr
constructor
A new instance of ClosedExpr.
- #to_adqls ⇒ Object
Methods inherited from ScalarExpression
Constructor Details
#initialize(val) ⇒ ClosedExpr
Returns a new instance of ClosedExpr.
112 113 114 |
# File 'lib/voruby/adql/adql.rb', line 112 def initialize(val) self.value = val end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
110 111 112 |
# File 'lib/voruby/adql/adql.rb', line 110 def value @value end |
Class Method Details
.from_xml(node) ⇒ Object
121 122 123 124 125 |
# File 'lib/voruby/adql/adql.rb', line 121 def self.from_xml(node) expr_node = REXML::XPath.first(node, 'Arg') expr = ScalarExpression.from_xml(expr_node) return ClosedExpr.new(expr) end |
Instance Method Details
#to_adqls ⇒ Object
14 15 16 |
# File 'lib/voruby/adql/transforms.rb', line 14 def to_adqls "(#{self.value.to_adqls})" end |