Class: VORuby::ADQL::V1_0::Function
- Inherits:
-
ScalarExpression
- Object
- SelectionItem
- ScalarExpression
- VORuby::ADQL::V1_0::Function
- Defined in:
- lib/voruby/adql/1.0/adql.rb
Overview
The base type for a function
Direct Known Subclasses
Instance Attribute Summary collapse
-
#allow ⇒ Object
Returns the value of attribute allow.
-
#arg ⇒ Object
Returns the value of attribute arg.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(f) ⇒ Object
-
#initialize(arg, allow = nil) ⇒ Function
constructor
A new instance of Function.
- #to_s ⇒ Object
- #to_xml(name = nil) ⇒ Object
Methods included from SerializableToXml
Constructor Details
#initialize(arg, allow = nil) ⇒ Function
Returns a new instance of Function.
470 471 472 473 474 |
# File 'lib/voruby/adql/1.0/adql.rb', line 470 def initialize(arg, allow=nil) super() self.arg = arg self.allow = allow end |
Instance Attribute Details
#allow ⇒ Object
Returns the value of attribute allow.
468 469 470 |
# File 'lib/voruby/adql/1.0/adql.rb', line 468 def allow @allow end |
#arg ⇒ Object
Returns the value of attribute arg.
468 469 470 |
# File 'lib/voruby/adql/1.0/adql.rb', line 468 def arg @arg end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
468 469 470 |
# File 'lib/voruby/adql/1.0/adql.rb', line 468 def name @name end |
Instance Method Details
#==(f) ⇒ Object
487 488 489 490 491 |
# File 'lib/voruby/adql/1.0/adql.rb', line 487 def ==(f) self.name == f.name and self.arg == f.arg and self.allow == f.allow end |
#to_s ⇒ Object
504 505 506 507 508 |
# File 'lib/voruby/adql/1.0/adql.rb', line 504 def to_s f = "#{self.name}(#{self.arg})" f = "#{self.allow} #{f}" if self.allow f end |
#to_xml(name = nil) ⇒ Object
493 494 495 496 497 498 499 500 501 502 |
# File 'lib/voruby/adql/1.0/adql.rb', line 493 def to_xml(name=nil) el = super(name) el.attributes["#{obj_ns.prefix}:Name"] = self.name.to_s el.add_element(self.allow.to_xml('Allow')) if self.allow el.add_element(self.arg.to_xml('Arg')) collapse_namespaces(el) el end |