Exception: Invokr::OptionalPositionalArgumentError
- Inherits:
-
StandardError
- Object
- StandardError
- Invokr::OptionalPositionalArgumentError
- Defined in:
- lib/invokr/errors.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(method, arg1, arg2) ⇒ OptionalPositionalArgumentError
constructor
A new instance of OptionalPositionalArgumentError.
Constructor Details
#initialize(method, arg1, arg2) ⇒ OptionalPositionalArgumentError
Returns a new instance of OptionalPositionalArgumentError.
61 62 63 64 65 66 67 |
# File 'lib/invokr/errors.rb', line 61 def initialize method, arg1, arg2 @message = <<-MESSAGE method `#{method}' has optional positional argument `#{arg2}', after optional argument `#{arg1}'. We cannot use this method because there's no way to supply an explicit value for `#{arg2}' without knowing the default value for `#{arg1}'. It's technically possible to overcome this with S-expression analysis, but a much simpler solution would be to use keyword arguments. MESSAGE end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
59 60 61 |
# File 'lib/invokr/errors.rb', line 59 def @message end |