Class: SetupConfiguration::Generator::MPSTemplateBinding
- Inherits:
-
TemplateBinding
- Object
- TemplateBinding
- SetupConfiguration::Generator::MPSTemplateBinding
- Defined in:
- lib/setup_configuration/mps_template_binding.rb
Instance Attribute Summary
Attributes inherited from TemplateBinding
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ MPSTemplateBinding
constructor
A new instance of MPSTemplateBinding.
- #languages ⇒ Object
- #param_infos(category_key) ⇒ Object
- #settings ⇒ Object
Methods inherited from TemplateBinding
#categories, #find_param_by_number, #get_binding
Constructor Details
#initialize {|_self| ... } ⇒ MPSTemplateBinding
Returns a new instance of MPSTemplateBinding.
9 10 11 12 |
# File 'lib/setup_configuration/mps_template_binding.rb', line 9 def initialize yield self if block_given? @max_number_parameters_per_tab=50 end |
Instance Method Details
#languages ⇒ Object
14 15 16 |
# File 'lib/setup_configuration/mps_template_binding.rb', line 14 def languages Translation.language_names end |
#param_infos(category_key) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/setup_configuration/mps_template_binding.rb', line 22 def param_infos(category_key) parameters=suite.categories[category_key] depends, machine_type, number, , roles=[], [], [], [], [] parameters.each() do |param| machine_type << param.machine_type number << param.number depends << depends_on(param.dependency) << param. roles << param.roles end #TODO compute value for max_number_parameters_per_tab of value maximum_numbers_per_category bundle = [depends, machine_type, number, , roles].collect() { |arr| arr.in_groups_of(@max_number_parameters_per_tab, false) } bundle = sanitize(bundle) bundle.collect(){ |v| v.collect(){ |arr| prepare(arr) } } end |
#settings ⇒ Object
18 19 20 |
# File 'lib/setup_configuration/mps_template_binding.rb', line 18 def settings self.suite.settings end |