Class: Iknow::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
attributes, #attributes, deserialize, #deserialize
Constructor Details
#initialize(params = {}) ⇒ Study
Returns a new instance of Study.
56 57 58 59 60 |
# File 'lib/iknow/model/user.rb', line 56 def initialize(params = {}) @today = (Date.parse(params[:today]) rescue nil) @results = self.deserialize(params[:study_results], :as => Iknow::User::Study::Result) @total_summary = self.deserialize(params[:total_summary], :as => Iknow::User::Study::TotalSummary) end |