module Cubic::Generator

The generator is what reads your sitemap file and generates the proper files.

Public Class Methods

run(&b) click to toggle source

Begins the generation process by running the block given from sitemap.rb file.

# File lib/cubic/generator.rb, line 18
def run(&b)
  @model      = Model.new
  @controller = Controller.new
  @gemfile    = Gemfile.new

  instance_exec(&b)
  App.create(@model, @controller, @gemfile)
end

Private Class Methods

config(&b) click to toggle source
# File lib/cubic/generator.rb, line 29
def config(&b)
  Config.instance_exec(&b)
end
controllers(&b) click to toggle source
# File lib/cubic/generator.rb, line 37
def controllers(&b)
  @controller.instance_exec(&b)
end
models(&b) click to toggle source
# File lib/cubic/generator.rb, line 33
def models(&b)
  @model.instance_exec(&b)
end