Class: SetupConfiguration::SuiteGenerator
- Inherits:
-
Object
- Object
- SetupConfiguration::SuiteGenerator
- Includes:
- Generator
- Defined in:
- lib/setup_configuration/suite_generator.rb
Instance Attribute Summary collapse
-
#do_not_run ⇒ Object
Returns the value of attribute do_not_run.
-
#suite ⇒ Object
Returns the value of attribute suite.
Class Method Summary collapse
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize ⇒ SuiteGenerator
constructor
A new instance of SuiteGenerator.
Methods included from Generator
#description_bindings, #description_template, #find_template, #mps_binding, #mps_template, #output, #output_path, #output_path=, #parameter_bindings, #parameter_template
Constructor Details
#initialize ⇒ SuiteGenerator
Returns a new instance of SuiteGenerator.
11 12 13 14 |
# File 'lib/setup_configuration/suite_generator.rb', line 11 def initialize self.do_not_run = false self.suite = Suite.instance end |
Instance Attribute Details
#do_not_run ⇒ Object
Returns the value of attribute do_not_run.
9 10 11 |
# File 'lib/setup_configuration/suite_generator.rb', line 9 def do_not_run @do_not_run end |
#suite ⇒ Object
Returns the value of attribute suite.
8 9 10 |
# File 'lib/setup_configuration/suite_generator.rb', line 8 def suite @suite end |
Class Method Details
.do_not_run ⇒ Object
16 17 18 |
# File 'lib/setup_configuration/suite_generator.rb', line 16 def self.do_not_run self.do_not_run=true end |
Instance Method Details
#generate ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/setup_configuration/suite_generator.rb', line 20 def generate return 'no output' if self.do_not_run description_bindings().each() do |bind| bind.suite=self.suite output(bind, description_template) end # extras: # -every PARAMETER key needs a value! # -use Windows line terminators CRLF - \r\n # - do not use [] #- output is an INI-file parameter_bindings().each() do |bind| bind.suite=self.suite template = parameter_template(bind.lang_name()) output(bind, template) end bind=mps_binding() bind.suite=self.suite mps_template=mps_template() output(bind, mps_template) SetupCodeGenerator.new.generate(self.suite, output_path) end |