Class: CaseGen::Generator
- Inherits:
-
Object
- Object
- CaseGen::Generator
- Defined in:
- lib/case_gen/generator.rb
Instance Attribute Summary collapse
-
#combos ⇒ Object
readonly
Returns the value of attribute combos.
-
#exclusions ⇒ Object
readonly
Returns the value of attribute exclusions.
-
#rules ⇒ Object
readonly
Returns the value of attribute rules.
-
#sets ⇒ Object
readonly
Returns the value of attribute sets.
Instance Method Summary collapse
-
#initialize(sets, rules) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(sets, rules) ⇒ Generator
Returns a new instance of Generator.
9 10 11 12 13 14 15 16 |
# File 'lib/case_gen/generator.rb', line 9 def initialize(sets, rules) @sets = sets.map do |title, values| CaseGen::Set.new(title, values) end @rules = rules @combos = generate_combinations apply_rules end |
Instance Attribute Details
#combos ⇒ Object (readonly)
Returns the value of attribute combos.
7 8 9 |
# File 'lib/case_gen/generator.rb', line 7 def combos @combos end |
#exclusions ⇒ Object (readonly)
Returns the value of attribute exclusions.
7 8 9 |
# File 'lib/case_gen/generator.rb', line 7 def exclusions @exclusions end |
#rules ⇒ Object (readonly)
Returns the value of attribute rules.
7 8 9 |
# File 'lib/case_gen/generator.rb', line 7 def rules @rules end |
#sets ⇒ Object (readonly)
Returns the value of attribute sets.
7 8 9 |
# File 'lib/case_gen/generator.rb', line 7 def sets @sets end |