Exception: Spear::ParametersRequired
- Defined in:
- lib/spear/exceptions.rb
Instance Attribute Summary collapse
-
#parameter ⇒ Object
readonly
Returns the value of attribute parameter.
Instance Method Summary collapse
-
#initialize(parameter) ⇒ ParametersRequired
constructor
A new instance of ParametersRequired.
Constructor Details
#initialize(parameter) ⇒ ParametersRequired
Returns a new instance of ParametersRequired.
7 8 9 10 11 12 13 14 15 |
# File 'lib/spear/exceptions.rb', line 7 def initialize(parameter) if parameter.kind_of?(Array) @parameter = parameter.join(', ') else @parameter = parameter end super("#{@parameter} is required.") end |
Instance Attribute Details
#parameter ⇒ Object (readonly)
Returns the value of attribute parameter.
5 6 7 |
# File 'lib/spear/exceptions.rb', line 5 def parameter @parameter end |