Class: ExceptionallyBeautiful::Error
- Inherits:
-
Object
- Object
- ExceptionallyBeautiful::Error
- Defined in:
- app/models/exceptionally_beautiful/error.rb
Instance Attribute Summary collapse
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(status_code) ⇒ Error
constructor
A new instance of Error.
- #message ⇒ Object
- #title ⇒ Object
Constructor Details
#initialize(status_code) ⇒ Error
Returns a new instance of Error.
5 6 7 |
# File 'app/models/exceptionally_beautiful/error.rb', line 5 def initialize(status_code) @status_code = status_code.to_i end |
Instance Attribute Details
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
3 4 5 |
# File 'app/models/exceptionally_beautiful/error.rb', line 3 def status_code @status_code end |
Instance Method Details
#message ⇒ Object
13 14 15 |
# File 'app/models/exceptionally_beautiful/error.rb', line 13 def ||= pretty_error_translation(:message) end |
#title ⇒ Object
9 10 11 |
# File 'app/models/exceptionally_beautiful/error.rb', line 9 def title @title ||= pretty_error_translation(:title) end |