Class: Atum::Generation::GeneratorService
- Inherits:
-
Object
- Object
- Atum::Generation::GeneratorService
- Defined in:
- lib/atum/generation/generator_service.rb
Defined Under Namespace
Classes: GeneratedFile
Instance Method Summary collapse
- #generate_files ⇒ Object
-
#initialize(module_name, schema_file, url, options) ⇒ GeneratorService
constructor
A new instance of GeneratorService.
Constructor Details
#initialize(module_name, schema_file, url, options) ⇒ GeneratorService
Returns a new instance of GeneratorService.
6 7 8 9 10 11 |
# File 'lib/atum/generation/generator_service.rb', line 6 def initialize(module_name, schema_file, url, ) @module_name = module_name @schema = schema_from_file(schema_file) @url = url @options = end |
Instance Method Details
#generate_files ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/atum/generation/generator_service.rb', line 13 def generate_files generate_namespace_folder generated_files.each do |gf| File.open("#{gf.path}.rb", 'w') do |f| f.write(gf.generator.generate) end end end |