Class: Iknow::User::Study

Inherits:
Base
  • Object
show all
Defined in:
lib/iknow/model/user.rb

Defined Under Namespace

Classes: Result, TotalSummary

Constant Summary collapse

ATTRIBUTES =
[:today, :results, :total_summary]

Instance Method Summary collapse

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