Class: SecureTrading::DataObject

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

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ DataObject

Returns a new instance of DataObject.



4
5
6
7
8
# File 'lib/secure_trading/data_object.rb', line 4

def initialize(attributes = {})
  attributes.each do |key,value|
    self.send("#{key}=", value) if self.respond_to?(key)
  end
end

Instance Method Details

#to_xml(options = {}) ⇒ Object



10
11
12
# File 'lib/secure_trading/data_object.rb', line 10

def to_xml(options = {})      
  Util.to_xml(self.to_hash, options) if self.respond_to?(:to_hash)
end