Module: Troupe
- Defined in:
- lib/troupe.rb,
lib/troupe/version.rb,
lib/troupe/contract.rb,
lib/troupe/contract/property.rb,
lib/troupe/contract_violation.rb,
lib/troupe/contract/property_table.rb
Defined Under Namespace
Modules: Contract Classes: ContractViolation
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/troupe.rb', line 9 def self.included(base) Interactor::Context.class_eval do def members @table.keys end end Interactor.class_eval do def run! validate_contract_expectations with_hooks do call context.called!(self) end ensure_contract_defaults rescue context.rollback! raise end end base.class_eval do include Interactor include Contract end end |