Exception: SearchObject::InvalidNumberError
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- SearchObject::InvalidNumberError
- Defined in:
- lib/search_object/errors.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
Instance Method Summary collapse
-
#initialize(field, number) ⇒ InvalidNumberError
constructor
A new instance of InvalidNumberError.
Constructor Details
#initialize(field, number) ⇒ InvalidNumberError
13 14 15 16 17 18 |
# File 'lib/search_object/errors.rb', line 13 def initialize(field, number) @field = field @number = number super "#{field} should be more than 0. Currently '#{number}' is given." end |
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
11 12 13 |
# File 'lib/search_object/errors.rb', line 11 def field @field end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
11 12 13 |
# File 'lib/search_object/errors.rb', line 11 def number @number end |