Class: SolutionData

Inherits:
Object
  • Object
show all
Defined in:
lib/libowl/solution_types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(region, time, target, sol_name, data) ⇒ SolutionData

Returns a new instance of SolutionData.



37
38
39
40
41
42
43
# File 'lib/libowl/solution_types.rb', line 37

def initialize(region, time, target, sol_name, data)
  @region = region
  @time = time
  @target = target
  @sol_name = sol_name
  @data = data
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



25
26
27
# File 'lib/libowl/solution_types.rb', line 25

def data
  @data
end

#regionObject

Returns the value of attribute region.



25
26
27
# File 'lib/libowl/solution_types.rb', line 25

def region
  @region
end

#sol_nameObject

Returns the value of attribute sol_name.



25
26
27
# File 'lib/libowl/solution_types.rb', line 25

def sol_name
  @sol_name
end

#targetObject

Returns the value of attribute target.



25
26
27
# File 'lib/libowl/solution_types.rb', line 25

def target
  @target
end

#timeObject

Returns the value of attribute time.



25
26
27
# File 'lib/libowl/solution_types.rb', line 25

def time
  @time
end

Instance Method Details

#to_sObject



45
46
47
# File 'lib/libowl/solution_types.rb', line 45

def to_s()
  return "#{@region}:#{@target}:#{@sol_name} @ time #{@time} -> #{@data.unpack('H*')}"
end