Class: InstanceAccountant::Poster
- Inherits:
-
Object
- Object
- InstanceAccountant::Poster
- Defined in:
- lib/instance_accountant/poster.rb
Instance Method Summary collapse
-
#initialize(options = { }) ⇒ Poster
constructor
A new instance of Poster.
- #post(hour, now) ⇒ Object
Constructor Details
#initialize(options = { }) ⇒ Poster
Returns a new instance of Poster.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/instance_accountant/poster.rb', line 12 def initialize = { } @options = @time_klass = @options[:time_klass] || Time @hour_klass = @options[:hour_klass] || Hour @subledger = @options[:subledger] || Subledger.new(@options.dup) @filer = @options[:filer] || Filer.new(@options) @journal_entry = @options[:journal_entry] || JournalEntry.new(@options) end |
Instance Method Details
#post(hour, now) ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/instance_accountant/poster.rb', line 23 def post hour, now if posted? hour false else write hour, now true end end |