Class: Zodra::Export::ContractMapper
- Inherits:
-
Object
- Object
- Zodra::Export::ContractMapper
- Defined in:
- lib/zodra/export/contract_mapper.rb
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(api_definitions, contracts) ⇒ ContractMapper
constructor
A new instance of ContractMapper.
Constructor Details
#initialize(api_definitions, contracts) ⇒ ContractMapper
Returns a new instance of ContractMapper.
6 7 8 9 |
# File 'lib/zodra/export/contract_mapper.rb', line 6 def initialize(api_definitions, contracts) @api_definitions = api_definitions @contracts = contracts end |
Instance Method Details
#generate ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/zodra/export/contract_mapper.rb', line 11 def generate return '' if @contracts.empty? parts = [] parts << build_import parts << build_contracts_map parts << build_base_url if @api_definitions.any? parts.join("\n\n") end |