Class: IbanCalculator::Bank
- Inherits:
-
Object
- Object
- IbanCalculator::Bank
- Defined in:
- lib/iban_calculator/bank.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#branch ⇒ Object
Returns the value of attribute branch.
-
#branch_code ⇒ Object
Returns the value of attribute branch_code.
-
#code ⇒ Object
Returns the value of attribute code.
-
#country ⇒ Object
Returns the value of attribute country.
-
#name ⇒ Object
Returns the value of attribute name.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #as_json(opts = {}) ⇒ Object
-
#initialize(attributes = {}) ⇒ Bank
constructor
A new instance of Bank.
Constructor Details
#initialize(attributes = {}) ⇒ Bank
Returns a new instance of Bank.
5 6 7 8 9 10 11 12 13 |
# File 'lib/iban_calculator/bank.rb', line 5 def initialize(attributes = {}) self.code = attributes[:code] self.name = attributes[:name] self.country = attributes[:country] self.address = attributes[:address] self.url = attributes[:url] self.branch = attributes[:branch] self.branch_code = attributes[:branch_code] end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
3 4 5 |
# File 'lib/iban_calculator/bank.rb', line 3 def address @address end |
#branch ⇒ Object
Returns the value of attribute branch.
3 4 5 |
# File 'lib/iban_calculator/bank.rb', line 3 def branch @branch end |
#branch_code ⇒ Object
Returns the value of attribute branch_code.
3 4 5 |
# File 'lib/iban_calculator/bank.rb', line 3 def branch_code @branch_code end |
#code ⇒ Object
Returns the value of attribute code.
3 4 5 |
# File 'lib/iban_calculator/bank.rb', line 3 def code @code end |
#country ⇒ Object
Returns the value of attribute country.
3 4 5 |
# File 'lib/iban_calculator/bank.rb', line 3 def country @country end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/iban_calculator/bank.rb', line 3 def name @name end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/iban_calculator/bank.rb', line 3 def url @url end |
Instance Method Details
#as_json(opts = {}) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/iban_calculator/bank.rb', line 15 def as_json(opts = {}) { code: code, name: name, country: country, address: address, url: url, branch: branch, branch_code: branch_code, } end |