Module: Cubic::Generator

Defined in:
lib/cubic/generator.rb,
lib/cubic/generators/app.rb,
lib/cubic/generators/base.rb,
lib/cubic/generators/view.rb,
lib/cubic/generators/model.rb,
lib/cubic/generators/config.rb,
lib/cubic/generators/gemfile.rb,
lib/cubic/generators/controller.rb,
lib/cubic/generators/migrations.rb

Overview

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

Defined Under Namespace

Classes: App, Base, Config, Controller, Gemfile, Migrations, Model, View

Class Method Summary collapse

Class Method Details

.run(&b) ⇒ Object

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



18
19
20
21
22
23
24
25
# 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