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.
68 69 70 71 72 73 74 |
# File 'lib/invokr/errors.rb', line 68 def initialize method, arg1, arg2 = "method `\#{method}' has optional positional argument `\#{arg2}', after optional argument `\#{arg1}'.\n\nWe 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.\n MESSAGE\nend\n" |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
66 67 68 |
# File 'lib/invokr/errors.rb', line 66 def end |