Exception: Poncho::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/poncho/error.rb

Direct Known Subclasses

ClientError, ServerError

Instance Method Summary collapse

Instance Method Details

#as_jsonObject



11
12
13
# File 'lib/poncho/error.rb', line 11

def as_json
  {:error => {:type => type, :message => message}}
end

#to_jsonObject



3
4
5
# File 'lib/poncho/error.rb', line 3

def to_json(*)
  as_json.to_json
end

#typeObject



7
8
9
# File 'lib/poncho/error.rb', line 7

def type
  inspect
end