Class: DevSystem::GeneratorGenerator

Inherits:
SimpleGenerator show all
Defined in:
lib/dev_system/sub/generator/generators/generator_generator.rb

Instance Attribute Summary

Attributes inherited from BaseGenerator

#env

Instance Method Summary collapse

Methods inherited from SimpleGenerator

#add_change, #changes, #copy_examples, #copy_file, #copy_files, #create_controller, #create_file, #create_unit, #inform, #last_change, #name!, #place!, #puts_line, #save

Methods inherited from BaseGenerator

#args, #call, call, #command, get_generator_signatures, #inform, #save

Methods inherited from Generator

get_generator_signatures

Methods inherited from Liza::Controller

color, inherited, on_connected

Methods inherited from Liza::Unit

const_missing, division, part, system, #system, test_class

Instance Method Details

#call_defaultObject

liza g generator name place=app



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/dev_system/sub/generator/generators/generator_generator.rb', line 5

def call_default
  @controller_class = Generator
  
  name!
  place!

  ancestor = SimpleGenerator
  create_controller @name, @controller_class, @place, @path, ancestor: ancestor do |unit, test|
    unit.section :controller_section_1, caption: "liza g #{@name} name place=app"
    unit.section :controller_section_2, caption: "liza g #{@name}:examples"
    unit.view    :generator_view_1, key: :controller_section_1
    test.section :controller_test_section_1
  end
end