Class: ExceptionallyBeautiful::Error
- Inherits:
-
Object
- Object
- ExceptionallyBeautiful::Error
- Defined in:
- app/models/exceptionally_beautiful/error.rb
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#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 8 |
# File 'app/models/exceptionally_beautiful/error.rb', line 5 def initialize(status_code) @status_code = status_code.to_i determine_status end |
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'app/models/exceptionally_beautiful/error.rb', line 3 def status @status end |
#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
14 15 16 |
# File 'app/models/exceptionally_beautiful/error.rb', line 14 def @message ||= pretty_error_translation(:message) end |
#title ⇒ Object
10 11 12 |
# File 'app/models/exceptionally_beautiful/error.rb', line 10 def title @title ||= pretty_error_translation(:title) end |