Class: Project::Unpacker::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/ossert/repositories.rb

Direct Known Subclasses

Quarter, Total

Instance Method Summary collapse

Constructor Details

#initialize(stored_project, stats_type) ⇒ Base

Returns a new instance of Base.



81
82
83
84
# File 'lib/ossert/repositories.rb', line 81

def initialize(stored_project, stats_type)
  @stats_type = stats_type
  @stored_project = stored_project
end

Instance Method Details

#coerce_value(value) ⇒ Object



86
87
88
89
90
# File 'lib/ossert/repositories.rb', line 86

def coerce_value(value)
  return DateTime.parse(value)
rescue
  value
end

#stored_dataObject



92
93
94
# File 'lib/ossert/repositories.rb', line 92

def stored_data
  @stored_project.send("#{@stats_type}_#{section}_data")
end