Class: Ibex::ErrorMessages::Entry
- Inherits:
-
Object
- Object
- Ibex::ErrorMessages::Entry
- Defined in:
- lib/ibex/error_messages.rb
Overview
One active or archived error-sentence entry with its source line.
Instance Attribute Summary collapse
-
#entry ⇒ Object
readonly
: String?.
-
#error_id ⇒ Object
readonly
: String?.
-
#line ⇒ Object
readonly
: Integer.
-
#message ⇒ Object
readonly
: String?.
-
#sentence ⇒ Object
readonly
: Array?.
-
#state ⇒ Object
readonly
: Integer?.
-
#status ⇒ Object
readonly
: :active | :unreachable | :removed.
Instance Method Summary collapse
-
#initialize(state:, status:, message:, line:, sentence: nil, error_id: nil, entry: nil) ⇒ Entry
constructor
A new instance of Entry.
Constructor Details
#initialize(state:, status:, message:, line:, sentence: nil, error_id: nil, entry: nil) ⇒ Entry
Returns a new instance of Entry.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/ibex/error_messages.rb', line 25 def initialize(state:, status:, message:, line:, sentence: nil, error_id: nil, entry: nil) @state = state @status = status @message = &.freeze @line = line @sentence = sentence&.dup&.freeze @error_id = error_id&.freeze @entry = entry&.freeze freeze end |
Instance Attribute Details
#entry ⇒ Object (readonly)
: String?
21 22 23 |
# File 'lib/ibex/error_messages.rb', line 21 def entry @entry end |
#error_id ⇒ Object (readonly)
: String?
20 21 22 |
# File 'lib/ibex/error_messages.rb', line 20 def error_id @error_id end |
#line ⇒ Object (readonly)
: Integer
18 19 20 |
# File 'lib/ibex/error_messages.rb', line 18 def line @line end |
#message ⇒ Object (readonly)
: String?
17 18 19 |
# File 'lib/ibex/error_messages.rb', line 17 def @message end |
#sentence ⇒ Object (readonly)
: Array?
19 20 21 |
# File 'lib/ibex/error_messages.rb', line 19 def sentence @sentence end |
#state ⇒ Object (readonly)
: Integer?
15 16 17 |
# File 'lib/ibex/error_messages.rb', line 15 def state @state end |
#status ⇒ Object (readonly)
: :active | :unreachable | :removed
16 17 18 |
# File 'lib/ibex/error_messages.rb', line 16 def status @status end |