Exception: Eco::API::UseCases::BaseIO::MissingParameter

Inherits:
StandardError
  • Object
show all
Defined in:
lib/eco/api/usecases/base_io.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, required:, given:, type: nil) ⇒ MissingParameter

Returns a new instance of MissingParameter.



14
15
16
17
18
19
20
21
# File 'lib/eco/api/usecases/base_io.rb', line 14

def initialize(msg = nil, required:, given:, type: nil)
  @type     = type
  @required = required
  @given    = given
  msg += " of type '#{type}'" if type
  msg += " requires an object '#{required}'. Given: #{given}."
  super(msg)
end

Instance Attribute Details

#givenObject (readonly)

Returns the value of attribute given.



12
13
14
# File 'lib/eco/api/usecases/base_io.rb', line 12

def given
  @given
end

#requiredObject (readonly)

Returns the value of attribute required.



12
13
14
# File 'lib/eco/api/usecases/base_io.rb', line 12

def required
  @required
end

#typeObject (readonly)

Returns the value of attribute type.



12
13
14
# File 'lib/eco/api/usecases/base_io.rb', line 12

def type
  @type
end