Class: VORuby::ADQL::V1_0::IntegerLiteral

Inherits:
NumberLiteral show all
Defined in:
lib/voruby/adql/1.0/adql.rb

Overview

Represents an integer

Instance Attribute Summary

Attributes inherited from Literal

#value

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Literal

#==, #initialize, #to_s, #to_xml

Methods included from SerializableToXml

#element

Constructor Details

This class inherits a constructor from VORuby::ADQL::V1_0::Literal

Class Method Details

.from_xml(xml) ⇒ Object



318
319
320
321
322
323
# File 'lib/voruby/adql/1.0/adql.rb', line 318

def self.from_xml(xml)
  root = element_from(xml)
  self.new(
    Integer(root.attributes.get_attribute_ns(obj_ns.uri, 'Value').value)
  )
end

.xml_typeObject



311
# File 'lib/voruby/adql/1.0/adql.rb', line 311

def self.xml_type; 'integerType' end

Instance Method Details

#value=(v) ⇒ Object



313
314
315
316
# File 'lib/voruby/adql/1.0/adql.rb', line 313

def value=(v)
  raise_argument_required_error('value') if v == nil
  super(Integer(v))
end