Exception: Forcast::Application::Error::General

Inherits:
StandardError
  • Object
show all
Defined in:
lib/forcast/controllers/application/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_message = nil) ⇒ General

Returns a new instance of General.



8
9
10
# File 'lib/forcast/controllers/application/error.rb', line 8

def initialize(_message=nil)
  @message = _message || 'Error General'
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



6
7
8
# File 'lib/forcast/controllers/application/error.rb', line 6

def error
  @error
end

#messageObject (readonly)

Returns the value of attribute message.



6
7
8
# File 'lib/forcast/controllers/application/error.rb', line 6

def message
  @message
end

#statusObject (readonly)

Returns the value of attribute status.



6
7
8
# File 'lib/forcast/controllers/application/error.rb', line 6

def status
  @status
end

Instance Method Details

#fetch_jsonObject



12
13
14
# File 'lib/forcast/controllers/application/error.rb', line 12

def fetch_json
  Helpers::Render.json(error, message, status)
end