Class: Keepr::GroupsCreator
- Inherits:
-
Object
- Object
- Keepr::GroupsCreator
- Defined in:
- lib/keepr/groups_creator.rb
Instance Method Summary collapse
-
#initialize(target) ⇒ GroupsCreator
constructor
A new instance of GroupsCreator.
- #run ⇒ Object
Constructor Details
#initialize(target) ⇒ GroupsCreator
Returns a new instance of GroupsCreator.
3 4 5 6 7 |
# File 'lib/keepr/groups_creator.rb', line 3 def initialize(target) raise ArgumentError unless [ :balance, :profit_and_loss ].include?(target) @target = target end |
Instance Method Details
#run ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/keepr/groups_creator.rb', line 9 def run case @target when :balance then load 'asset.txt', :target => :asset load 'liability.txt', :target => :liability when :profit_and_loss load 'profit_and_loss.txt', :target => :profit_and_loss end end |