Exception: Invokr::OptionalPositionalArgumentError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/invokr/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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
  @message = "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

#messageObject (readonly)

Returns the value of attribute message.



66
67
68
# File 'lib/invokr/errors.rb', line 66

def message
  @message
end