Class: ZenginCode::Bank
- Inherits:
-
Object
- Object
- ZenginCode::Bank
- Defined in:
- lib/zengin_code/bank.rb
Instance Attribute Summary collapse
-
#branches ⇒ Object
readonly
Returns the value of attribute branches.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#kana ⇒ Object
readonly
Returns the value of attribute kana.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#roma ⇒ Object
readonly
Returns the value of attribute roma.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(code, name, kana, hira, roma) ⇒ Bank
constructor
A new instance of Bank.
Constructor Details
#initialize(code, name, kana, hira, roma) ⇒ Bank
Returns a new instance of Bank.
20 21 22 23 24 25 26 27 |
# File 'lib/zengin_code/bank.rb', line 20 def initialize(code, name, kana, hira, roma) @code = code @name = name @kana = kana @roma = roma @branches = {} self.class[code] = self end |
Instance Attribute Details
#branches ⇒ Object (readonly)
Returns the value of attribute branches.
28 29 30 |
# File 'lib/zengin_code/bank.rb', line 28 def branches @branches end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
28 29 30 |
# File 'lib/zengin_code/bank.rb', line 28 def code @code end |
#kana ⇒ Object (readonly)
Returns the value of attribute kana.
28 29 30 |
# File 'lib/zengin_code/bank.rb', line 28 def kana @kana end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
28 29 30 |
# File 'lib/zengin_code/bank.rb', line 28 def name @name end |
#roma ⇒ Object (readonly)
Returns the value of attribute roma.
28 29 30 |
# File 'lib/zengin_code/bank.rb', line 28 def roma @roma end |
Class Method Details
.[](code) ⇒ Object
7 8 9 |
# File 'lib/zengin_code/bank.rb', line 7 def [](code) @banks[code] end |
.[]=(code, bank) ⇒ Object
11 12 13 |
# File 'lib/zengin_code/bank.rb', line 11 def []=(code, bank) @banks[code] = bank end |
.all ⇒ Object
15 16 17 |
# File 'lib/zengin_code/bank.rb', line 15 def all @banks end |