Class: Dbxml::XmlValue

Inherits:
Object
  • Object
show all
Defined in:
lib/rdbxml.rb

Overview

Wraps and extends the XmlValue class.

Aliases:

to_s

asString

to_f

asNumber

to_doc

asDocument (XmlDocument)

to_i

#to_f

Instance Method Summary collapse

Instance Method Details

#==(that) ⇒ Object

Handles Numeric/Boolean/String comparisons



53
54
55
56
57
58
59
60
61
# File 'lib/rdbxml.rb', line 53

def ==( that )
  if isNumber
    self.asNumber == that
  elsif isBoolean
    self.asBoolean == that
  else
    self.asString == that.to_s
  end
end

#to_iObject

:nodoc:



48
49
50
# File 'lib/rdbxml.rb', line 48

def to_i # :nodoc:
  self.to_f.to_i
end