Exception: Eco::API::UseCases::BaseIO::MissingParameter
- Inherits:
-
StandardError
- Object
- StandardError
- Eco::API::UseCases::BaseIO::MissingParameter
- Defined in:
- lib/eco/api/usecases/base_io.rb
Instance Attribute Summary collapse
-
#given ⇒ Object
readonly
Returns the value of attribute given.
-
#required ⇒ Object
readonly
Returns the value of attribute required.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(msg = nil, type: nil, required:, given:) ⇒ MissingParameter
constructor
A new instance of MissingParameter.
Constructor Details
#initialize(msg = nil, type: nil, required:, given:) ⇒ MissingParameter
Returns a new instance of MissingParameter.
11 12 13 14 15 16 17 18 |
# File 'lib/eco/api/usecases/base_io.rb', line 11 def initialize(msg = nil, type: nil, required:, given:) @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
#given ⇒ Object (readonly)
Returns the value of attribute given.
9 10 11 |
# File 'lib/eco/api/usecases/base_io.rb', line 9 def given @given end |
#required ⇒ Object (readonly)
Returns the value of attribute required.
9 10 11 |
# File 'lib/eco/api/usecases/base_io.rb', line 9 def required @required end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
9 10 11 |
# File 'lib/eco/api/usecases/base_io.rb', line 9 def type @type end |