Class: DataContract
- Inherits:
-
Module
- Object
- Module
- DataContract
- Defined in:
- lib/data_contract/data_contract.rb,
lib/data_contract/implementation.rb
Defined Under Namespace
Modules: Implementation
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(contract_module) ⇒ DataContract
constructor
A new instance of DataContract.
Constructor Details
#initialize(contract_module) ⇒ DataContract
Returns a new instance of DataContract.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/data_contract/data_contract.rb', line 6 def initialize(contract_module) mod = contract_module define_method(:contract_module) do return contract_module end include contract_module include Implementation end |
Class Method Details
.[](contract_module) ⇒ Object
2 3 4 |
# File 'lib/data_contract/data_contract.rb', line 2 def self.[](contract_module) new contract_module end |