Class: MollieNLIDeal::Bank
- Inherits:
-
Object
- Object
- MollieNLIDeal::Bank
- Defined in:
- lib/mollienl-ideal/bank.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(values = nil) ⇒ Bank
constructor
A new instance of Bank.
Constructor Details
#initialize(values = nil) ⇒ Bank
Returns a new instance of Bank.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/mollienl-ideal/bank.rb', line 5 def initialize(values=nil) return if values.nil? if values.kind_of?(Hash) values.each { |key, value| self.send key.to_s + "=", value } elsif values.kind_of?(REXML::Element) @id = values.get_text("bank_id").to_s.to_i @name = values.get_text("bank_name").to_s end end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/mollienl-ideal/bank.rb', line 3 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/mollienl-ideal/bank.rb', line 3 def name @name end |