Class: CLabs::CaseGen::Set

Inherits:
Object show all
Defined in:
lib/agents/sets.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, data_array) ⇒ Set

Returns a new instance of Set.



16
17
18
19
20
# File 'lib/agents/sets.rb', line 16

def initialize(name, data_array)
  @name = name
  @data = data_array
  strip_data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



14
15
16
# File 'lib/agents/sets.rb', line 14

def data
  @data
end

#nameObject (readonly)

Returns the value of attribute name.



14
15
16
# File 'lib/agents/sets.rb', line 14

def name
  @name
end

Instance Method Details

#strip_dataObject



22
23
24
# File 'lib/agents/sets.rb', line 22

def strip_data
  @data.collect! do |datum| datum.strip end
end

#valuesObject



26
27
28
# File 'lib/agents/sets.rb', line 26

def values
  @data
end