Exception: Yelp::Error::InvalidParameter

Inherits:
Base
  • Object
show all
Defined in:
lib/yelp/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = 'One or more parameters were invalid', error = nil) ⇒ InvalidParameter

Returns a new instance of InvalidParameter.



82
83
84
85
86
87
88
89
# File 'lib/yelp/error.rb', line 82

def initialize(msg='One or more parameters were invalid', error=nil)
  unless error.nil?
    @text = error['text']
    @field = error['field']
    msg = msg + ': ' + @field
  end
  super(msg,error)
end

Instance Attribute Details

#fieldObject (readonly)

Returns the value of attribute field.



80
81
82
# File 'lib/yelp/error.rb', line 80

def field
  @field
end

#textObject (readonly)

Returns the value of attribute text.



80
81
82
# File 'lib/yelp/error.rb', line 80

def text
  @text
end