Class: Camdram::Diary::Week

Inherits:
Base
  • Object
show all
Defined in:
lib/camdram/diary.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#id

Instance Method Summary collapse

Methods inherited from Base

#make_orphan

Constructor Details

#initialize(*args) ⇒ Camdram::Diary::Week

Instantiate a new Week object from a JSON hash

Parameters:

  • options (Hash)

    A single JSON hash with symbolized keys.


19
20
21
22
# File 'lib/camdram/diary.rb', line 19

def initialize(*args)
  super(*args)
  @start_at = Date.parse(@start_at) unless @start_at.nil?
end

Instance Attribute Details

#start_atObject

Returns the value of attribute start_at


13
14
15
# File 'lib/camdram/diary.rb', line 13

def start_at
  @start_at
end

#textObject

Returns the value of attribute text


13
14
15
# File 'lib/camdram/diary.rb', line 13

def text
  @text
end