Class: Smartfm::User::Study
Defined Under Namespace
Classes: Result, TotalSummary
Constant Summary collapse
- ATTRIBUTES =
[:today, :results, :total_summary]
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Study
constructor
A new instance of Study.
Methods inherited from Base
Constructor Details
#initialize(params = {}) ⇒ Study
Returns a new instance of Study.
59 60 61 62 63 |
# File 'lib/smartfm/models/user.rb', line 59 def initialize(params = {}) @today = (Date.parse(params[:today]) rescue nil) @results = self.deserialize(params[:study_results], :as => Smartfm::User::Study::Result) @total_summary = self.deserialize(params[:total_summary], :as => Smartfm::User::Study::TotalSummary) end |