Class: DevSystem::BenchGenerator
- Inherits:
-
SimpleGenerator
- Object
- Liza::Unit
- Liza::Controller
- Generator
- BaseGenerator
- SimpleGenerator
- DevSystem::BenchGenerator
- Defined in:
- lib/dev_system/sub/bench/generators/bench_generator.rb
Instance Attribute Summary
Attributes inherited from BaseGenerator
Instance Method Summary collapse
-
#call_default ⇒ Object
liza g bench name place=app +sorted.
-
#call_examples ⇒ Object
liza g bench:examples.
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
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_default ⇒ Object
liza g bench name place=app +sorted
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/dev_system/sub/bench/generators/bench_generator.rb', line 5 def call_default @controller_class = Bench name! place! @args = Array command.simple_args[1..-1] ancestor = @controller_class # THIS IS A HACK! WILL BE FIXED SOON! if File.exist? "app/dev/benches/sorted_bench.rb" @sorted = command.simple_boolean_yes :sorted, "Use SortedBench?" log "@sorted = #{@sorted.inspect}" ancestor = "SortedBench" if @sorted end create_controller @name, @controller_class, @place, @path, ancestor: ancestor do |unit, test| unit.section :controller_section_1, caption: "liza bench #{ @name }" test.section :controller_test_section_1 end end |
#call_examples ⇒ Object
liza g bench:examples
29 30 31 |
# File 'lib/dev_system/sub/bench/generators/bench_generator.rb', line 29 def call_examples copy_examples Bench end |