Exception: StubRequests::PropertyDefined
- Defined in:
- lib/stub_requests/exceptions.rb
Overview
PropertyDefined is raised when trying to add the same property twice
Instance Method Summary collapse
-
#initialize(name:, type:, default:) ⇒ PropertyDefined
constructor
A new instance of PropertyDefined.
Constructor Details
#initialize(name:, type:, default:) ⇒ PropertyDefined
Returns a new instance of PropertyDefined
79 80 81 82 |
# File 'lib/stub_requests/exceptions.rb', line 79 def initialize(name:, type:, default:) default = "nil" if default.is_a?(NilClass) super("Property ##{name} was already defined as `{ type: #{type}, default: #{default} }") end |