Class: Generambo::GenerambofileGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/generambo/code_generation/generambofile_generator.rb

Class Method Summary collapse

Class Method Details

.create_generambofile(properties) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/generambo/code_generation/generambofile_generator.rb', line 6

def self.create_generambofile(properties)
  file_source = IO.read(File.dirname(__FILE__) + '/Generambofile.liquid')

  template = Liquid::Template.parse(file_source)
  output = template.render(properties)

  File.open(GENERAMBO_FILE, 'w+') { |f| f.write(output) }
end