class Camdram::Diary

Attributes

events[RW]

Public Class Methods

new(options = {}) click to toggle source

Instantiate a new Diary object from a JSON hash

@param options [Hash] A single JSON hash with symbolized keys. @return [Camdram::Event] The new Diary object.

Calls superclass method Camdram::API::new
# File lib/camdram/diary.rb, line 14
def initialize(options = {})
  super(options)
  @events = split_object( @events, Event ) unless @events.nil?
end

Public Instance Methods

info() click to toggle source

Return a hash of the diary's attributes

@return [Hash] Hash with symbolized keys.

# File lib/camdram/diary.rb, line 22
def info
  {
    events: events,
  }
end