Class: NamedParameter::Errors::NotHash
- Inherits:
-
Object
- Object
- NamedParameter::Errors::NotHash
- Defined in:
- lib/named_parameter/errors/not_hash.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(error) ⇒ NotHash
constructor
A new instance of NotHash.
- #raise_args ⇒ Object
Constructor Details
#initialize(error) ⇒ NotHash
Returns a new instance of NotHash.
13 14 15 |
# File 'lib/named_parameter/errors/not_hash.rb', line 13 def initialize(error) @error = error end |
Class Method Details
.all_when(named_method, options) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/named_parameter/errors/not_hash.rb', line 3 def self.all_when(named_method,) args = [:called_with] if args.is_a? Hash [] else error = NamedParameter::Error.new(named_method,args,caller) [NotHash.new(error)] end end |
Instance Method Details
#raise_args ⇒ Object
17 18 19 |
# File 'lib/named_parameter/errors/not_hash.rb', line 17 def raise_args [,@error.backtrace] end |