Exception: SmartProperties::ConstructorArgumentForwardingError
- Inherits:
-
Error
- Object
- ArgumentError
- Error
- SmartProperties::ConstructorArgumentForwardingError
- Defined in:
- lib/smart_properties/errors.rb
Instance Method Summary collapse
-
#initialize(positional_arguments, keyword_arguments) ⇒ ConstructorArgumentForwardingError
constructor
A new instance of ConstructorArgumentForwardingError.
Constructor Details
#initialize(positional_arguments, keyword_arguments) ⇒ ConstructorArgumentForwardingError
Returns a new instance of ConstructorArgumentForwardingError.
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/smart_properties/errors.rb', line 17 def initialize(positional_arguments, keyword_arguments) argument_description = [ generate_description("positional", positional_arguments.count), generate_description("keyword", keyword_arguments.count) ].compact arguments = positional_arguments + keyword_arguments.map { |name, value| "#{name}: #{value}" } super "Forwarding the following %s failed: %s" % [ argument_description.join(" and "), arguments.join(", ") ] end |