Class: CommaSplice::JoinPossibilities
- Inherits:
-
Object
- Object
- CommaSplice::JoinPossibilities
- Defined in:
- lib/comma_splice/helpers/join_possibilities.rb
Instance Attribute Summary collapse
-
#from_size ⇒ Object
readonly
Returns the value of attribute from_size.
-
#to_size ⇒ Object
readonly
Returns the value of attribute to_size.
Instance Method Summary collapse
-
#initialize(value_count, header_count) ⇒ JoinPossibilities
constructor
A new instance of JoinPossibilities.
- #possibilities ⇒ Object
Constructor Details
#initialize(value_count, header_count) ⇒ JoinPossibilities
Returns a new instance of JoinPossibilities.
7 8 9 10 |
# File 'lib/comma_splice/helpers/join_possibilities.rb', line 7 def initialize(value_count, header_count) @from_size = value_count @to_size = header_count end |
Instance Attribute Details
#from_size ⇒ Object (readonly)
Returns the value of attribute from_size.
5 6 7 |
# File 'lib/comma_splice/helpers/join_possibilities.rb', line 5 def from_size @from_size end |
#to_size ⇒ Object (readonly)
Returns the value of attribute to_size.
5 6 7 |
# File 'lib/comma_splice/helpers/join_possibilities.rb', line 5 def to_size @to_size end |
Instance Method Details
#possibilities ⇒ Object
12 13 14 |
# File 'lib/comma_splice/helpers/join_possibilities.rb', line 12 def possibilities @possibilities ||= permutations(combos(from_size, to_size)) end |