Class: Object

Inherits:
BasicObject
Defined in:
lib/savon/core_ext/object.rb

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns true if the Object is false, empty, or a whitespace string. For example, “”, false, nil, [], and {} are blank. Implementation from ActiveSupport.

Returns:

  • (Boolean)


6
7
8
# File 'lib/savon/core_ext/object.rb', line 6

def blank?
  respond_to?(:empty?) ? empty? : !self
end

#to_soap_keyObject

Returns the Object as a SOAP request compliant key.



11
12
13
# File 'lib/savon/core_ext/object.rb', line 11

def to_soap_key
  to_s
end

#to_soap_valueObject

Returns the Object as a SOAP request compliant value.



16
17
18
19
# File 'lib/savon/core_ext/object.rb', line 16

def to_soap_value
  return to_s unless respond_to? :to_datetime
  to_datetime.to_soap_value
end