Exception: 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, required:, given:, type: nil) ⇒ MissingParameter
constructor
A new instance of MissingParameter.
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
#given ⇒ Object (readonly)
Returns the value of attribute given.
12 13 14 |
# File 'lib/eco/api/usecases/base_io.rb', line 12 def given @given end |
#required ⇒ Object (readonly)
Returns the value of attribute required.
12 13 14 |
# File 'lib/eco/api/usecases/base_io.rb', line 12 def required @required end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
12 13 14 |
# File 'lib/eco/api/usecases/base_io.rb', line 12 def type @type end |