Exception: Simple::Service::ExtraArgumentError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/simple/service/errors.rb

Direct Known Subclasses

UnknownFlagError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action, arguments) ⇒ ExtraArgumentError

Returns a new instance of ExtraArgumentError.



39
40
41
42
# File 'lib/simple/service/errors.rb', line 39

def initialize(action, arguments)
  @action, @arguments = action, arguments
  super()
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



36
37
38
# File 'lib/simple/service/errors.rb', line 36

def action
  @action
end

#argumentsObject (readonly)

Returns the value of attribute arguments.



37
38
39
# File 'lib/simple/service/errors.rb', line 37

def arguments
  @arguments
end

Instance Method Details

#to_sObject



44
45
46
47
# File 'lib/simple/service/errors.rb', line 44

def to_s
  str = arguments.map(&:inspect).join(", ")
  "#{action}: extra argument(s): #{str}"
end