Class: Stannum::Contract::Builder Private
- Inherits:
-
Stannum::Contracts::Base::Builder
- Object
- Stannum::Contracts::Base::Builder
- Stannum::Contract::Builder
- Defined in:
- lib/stannum/contract.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Builder class for defining item constraints for a Contract.
This class should not be invoked directly. Instead, pass a block to the constructor for Contract.
Direct Known Subclasses
Stannum::Contracts::MapContract::Builder, Stannum::Contracts::ParametersContract::Builder, Stannum::Contracts::TupleContract::Builder
Instance Method Summary collapse
-
#property(property, constraint = nil, **options, &block) ⇒ Object
private
Defines a property constraint on the contract.
Instance Method Details
#property(property, constraint, **options) ⇒ Object #property(**options) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Defines a property constraint on the contract.
120 121 122 123 124 125 126 127 |
# File 'lib/stannum/contract.rb', line 120 def property(property, constraint = nil, **, &block) self.constraint( constraint, property: property, **, &block ) end |