Exception: InfomemeClient::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/infomeme_client/errors.rb

Direct Known Subclasses

InternalError, NoAccess, NotFound, RequestFailed

Defined Under Namespace

Classes: InternalError, NoAccess, NotFound, RequestFailed

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Error

Returns a new instance of Error.



9
10
11
12
13
# File 'lib/infomeme_client/errors.rb', line 9

def initialize(args)
	@errors = args.shift
	msg = args.shift
	super(msg)
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



7
8
9
# File 'lib/infomeme_client/errors.rb', line 7

def errors
  @errors
end

Instance Method Details

#inspectObject



19
20
21
# File 'lib/infomeme_client/errors.rb', line 19

def inspect
	"<#{self.class.inspect} #{self.message}>"
end

#messageObject



15
16
17
# File 'lib/infomeme_client/errors.rb', line 15

def message
	"#{super} Errors: #{errors.inspect}"
end