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 = { } = @time_klass = [:time_klass] || Time @hour_klass = [:hour_klass] || Hour @subledger = [:subledger] || Subledger.new(.dup) @filer = [:filer] || Filer.new() @journal_entry = [:journal_entry] || JournalEntry.new() 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 |