Class: Subledger::Domain::ActiveJournalEntry
- Inherits:
-
JournalEntry
- Object
- JournalEntry
- Subledger::Domain::ActiveJournalEntry
- Includes:
- Roles::Activatable, Roles::Archivable, Roles::Postable
- Defined in:
- lib/subledger/domain/journal_entry.rb
Defined Under Namespace
Classes: Entity
Instance Attribute Summary collapse
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Attributes inherited from JournalEntry
#book, #effective_at, #org, #post_delay
Attributes included from Roles::Versionable
Attributes included from Roles::Storable
Attributes included from Roles::Identifiable
Attributes included from Roles::Describable
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Roles::Archivable
Methods included from Roles::Activatable
Methods included from Roles::Postable
#post, #posted_klass, #posting_klass
Methods inherited from JournalEntry
active_klass, archived_klass, #balance, #balanced?, create_and_post, #initialize, #line, #lines, patch_keys, post_keys, posted_klass, posting_klass, root_klass
Methods included from Roles::Restable
#patch_hash, #post_hash, #serializable_hash, #to_json
Methods included from Roles::Collectable
Methods included from Roles::Progressable
Methods included from Roles::Updatable
Methods included from Roles::Readable
Methods included from Roles::Creatable
Methods included from Roles::Versionable
Methods included from Roles::Storable
Methods included from Roles::Describable
Methods included from Roles::Attributable
Methods included from Subledger::Domain
#==, #collection_name, #entity_name, included, #to_s
Constructor Details
This class inherits a constructor from Subledger::Domain::JournalEntry
Instance Attribute Details
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
220 221 222 |
# File 'lib/subledger/domain/journal_entry.rb', line 220 def reason @reason end |
Class Method Details
.sub_klasses ⇒ Object
228 229 230 |
# File 'lib/subledger/domain/journal_entry.rb', line 228 def self.sub_klasses [ active_klass ] end |
Instance Method Details
#create_line(args) ⇒ Object
232 233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/subledger/domain/journal_entry.rb', line 232 def create_line args args.merge! :client => client, :journal_entry => self, :effective_at => effective_at Line.raise_on_duplicate_orders args client.active_lines.validate_creatability args active_line = client.active_lines args store.create_line :line => active_line end |