Class: Camdram::Diary
Instance Attribute Summary collapse
-
#events ⇒ Object
Returns the value of attribute events.
Attributes included from API
Attributes inherited from Base
Instance Method Summary collapse
-
#info ⇒ Hash
Return a hash of the diary's attributes.
-
#initialize(options = {}) ⇒ Camdram::Event
constructor
Instantiate a new Diary object from a JSON hash.
Methods included from API
Constructor Details
#initialize(options = {}) ⇒ Camdram::Event
Instantiate a new Diary object from a JSON hash
14 15 16 17 |
# File 'lib/camdram/diary.rb', line 14 def initialize( = {}) super() @events = split_object( @events, Event ) unless @events.nil? end |
Instance Attribute Details
#events ⇒ Object
Returns the value of attribute events.
8 9 10 |
# File 'lib/camdram/diary.rb', line 8 def events @events end |
Instance Method Details
#info ⇒ Hash
Return a hash of the diary's attributes
22 23 24 25 26 |
# File 'lib/camdram/diary.rb', line 22 def info { events: events, } end |