Class: CaseGen::Set

Inherits:
Object
  • Object
show all
Defined in:
lib/case_gen/set.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title, values) ⇒ Set

Returns a new instance of Set.



7
8
9
10
# File 'lib/case_gen/set.rb', line 7

def initialize(title, values)
  @title = title
  @values = values
end

Instance Attribute Details

#titleObject (readonly)

Returns the value of attribute title.



5
6
7
# File 'lib/case_gen/set.rb', line 5

def title
  @title
end

#valuesObject (readonly)

Returns the value of attribute values.



5
6
7
# File 'lib/case_gen/set.rb', line 5

def values
  @values
end

Instance Method Details

#hash_pairsObject



12
13
14
# File 'lib/case_gen/set.rb', line 12

def hash_pairs
  @values.map { |v| {@title => v} }
end