Class: ExceptionallyBeautiful::Error

Inherits:
Object
  • Object
show all
Defined in:
app/models/exceptionally_beautiful/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_codeObject (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

#messageObject



13
14
15
# File 'app/models/exceptionally_beautiful/error.rb', line 13

def message
  @message ||= pretty_error_translation(:message)
end

#titleObject



9
10
11
# File 'app/models/exceptionally_beautiful/error.rb', line 9

def title
  @title ||= pretty_error_translation(:title)
end