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