Exception: Yelp::Error::InvalidParameter
- Defined in:
- lib/yelp/error.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(msg = 'One or more parameters were invalid', error = nil) ⇒ InvalidParameter
constructor
A new instance of InvalidParameter.
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
#field ⇒ Object (readonly)
Returns the value of attribute field.
80 81 82 |
# File 'lib/yelp/error.rb', line 80 def field @field end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
80 81 82 |
# File 'lib/yelp/error.rb', line 80 def text @text end |