Class: Burglar::Bank
- Inherits:
-
Object
- Object
- Burglar::Bank
- Defined in:
- lib/burglar/bank.rb
Overview
Single bank’s information
Instance Method Summary collapse
- #account_name ⇒ Object
- #begin_date ⇒ Object
- #end_date ⇒ Object
-
#initialize(params = {}) ⇒ Bank
constructor
A new instance of Bank.
- #transactions ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ Bank
Returns a new instance of Bank.
5 6 7 8 |
# File 'lib/burglar/bank.rb', line 5 def initialize(params = {}) @options = params extend module_obj end |
Instance Method Details
#account_name ⇒ Object
22 23 24 |
# File 'lib/burglar/bank.rb', line 22 def account_name @account_name ||= @options[:account] || default_account_name end |
#begin_date ⇒ Object
14 15 16 |
# File 'lib/burglar/bank.rb', line 14 def begin_date @begin_date ||= @options[:begin] end |
#end_date ⇒ Object
18 19 20 |
# File 'lib/burglar/bank.rb', line 18 def end_date @end_date ||= @options[:end] end |
#transactions ⇒ Object
10 11 12 |
# File 'lib/burglar/bank.rb', line 10 def transactions Ledger.new(entries: raw_transactions) end |