Exception: RockBooks::AccountNotFoundError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- RockBooks::AccountNotFoundError
- Defined in:
- lib/rock_books/errors/account_not_found_error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#journal_entry_context ⇒ Object
Returns the value of attribute journal_entry_context.
Instance Method Summary collapse
-
#initialize(code, journal_entry_context) ⇒ AccountNotFoundError
constructor
A new instance of AccountNotFoundError.
- #to_s ⇒ Object
Constructor Details
#initialize(code, journal_entry_context) ⇒ AccountNotFoundError
Returns a new instance of AccountNotFoundError.
9 10 11 12 13 |
# File 'lib/rock_books/errors/account_not_found_error.rb', line 9 def initialize(code, journal_entry_context) self.code = code self.journal_entry_context = journal_entry_context super(to_s) end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
7 8 9 |
# File 'lib/rock_books/errors/account_not_found_error.rb', line 7 def code @code end |
#journal_entry_context ⇒ Object
Returns the value of attribute journal_entry_context.
7 8 9 |
# File 'lib/rock_books/errors/account_not_found_error.rb', line 7 def journal_entry_context @journal_entry_context end |
Instance Method Details
#to_s ⇒ Object
16 17 18 19 |
# File 'lib/rock_books/errors/account_not_found_error.rb', line 16 def to_s ctx = journal_entry_context "Account code '#{code}' in journal '#{ctx.journal.short_name}', line ##{ctx.linenum} not found in chart of accounts. Line: '#{ctx.line}'" end |