Class: CommaSplice::JoinPossibilities

Inherits:
Object
  • Object
show all
Defined in:
lib/comma_splice/helpers/join_possibilities.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_sizeObject (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_sizeObject (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

#possibilitiesObject



12
13
14
# File 'lib/comma_splice/helpers/join_possibilities.rb', line 12

def possibilities
  @possibilities ||= permutations(combos(from_size, to_size))
end