Class: Burglar::Bank

Inherits:
Object
  • Object
show all
Defined in:
lib/burglar/bank.rb

Overview

Single bank’s information

Instance Method Summary collapse

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_nameObject



22
23
24
# File 'lib/burglar/bank.rb', line 22

def 
  @account_name ||= @options[:account] || 
end

#begin_dateObject



14
15
16
# File 'lib/burglar/bank.rb', line 14

def begin_date
  @begin_date ||= @options[:begin]
end

#end_dateObject



18
19
20
# File 'lib/burglar/bank.rb', line 18

def end_date
  @end_date ||= @options[:end]
end

#transactionsObject



10
11
12
# File 'lib/burglar/bank.rb', line 10

def transactions
  Ledger.new(entries: raw_transactions)
end