Exception: BaseCRM::ResourceError

Inherits:
BaseError
  • Object
show all
Defined in:
lib/basecrm/errors.rb

Instance Attribute Summary collapse

Attributes inherited from BaseError

#code, #details, #message

Instance Method Summary collapse

Constructor Details

#initialize(error) ⇒ ResourceError

Returns a new instance of ResourceError.



31
32
33
34
35
36
# File 'lib/basecrm/errors.rb', line 31

def initialize(error)
  super

  @resource = @data[:resource]
  @field = @data[:field]
end

Instance Attribute Details

#fieldObject (readonly)

Returns the value of attribute field.



29
30
31
# File 'lib/basecrm/errors.rb', line 29

def field
  @field
end

#resourceObject (readonly)

Returns the value of attribute resource.



29
30
31
# File 'lib/basecrm/errors.rb', line 29

def resource
  @resource
end

Instance Method Details

#to_sObject



38
39
40
# File 'lib/basecrm/errors.rb', line 38

def to_s
  super + " resource=#{@resource} field=#{@field}"
end