Exception: GoodGuide::Gibbon::Failure

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/goodguide/gibbon.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ Failure

Returns a new instance of Failure.



203
204
205
# File 'lib/goodguide/gibbon.rb', line 203

def initialize(message)
  @message = message
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



202
203
204
# File 'lib/goodguide/gibbon.rb', line 202

def message
  @message
end

Instance Method Details

#as_jsonObject



207
208
209
210
211
212
# File 'lib/goodguide/gibbon.rb', line 207

def as_json(*)
  {
    'status' => 'failure',
    'message' => message,
  }
end