Class: Gaah::Calendar::Calendar
- Defined in:
- lib/gaah/calendar/calendar.rb
Instance Attribute Summary collapse
-
#access_role ⇒ Object
readonly
Returns the value of attribute access_role.
-
#bg_color ⇒ Object
readonly
Returns the value of attribute bg_color.
-
#color_id ⇒ Object
readonly
Returns the value of attribute color_id.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#fg_color ⇒ Object
readonly
Returns the value of attribute fg_color.
-
#hidden ⇒ Object
readonly
Returns the value of attribute hidden.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#primary ⇒ Object
readonly
Returns the value of attribute primary.
-
#selected ⇒ Object
readonly
Returns the value of attribute selected.
-
#summary ⇒ Object
readonly
Returns the value of attribute summary.
-
#time_zone ⇒ Object
readonly
Returns the value of attribute time_zone.
Instance Method Summary collapse
-
#initialize(json) ⇒ Calendar
constructor
A new instance of Calendar.
- #marshal_dump ⇒ Object
- #marshal_load(array) ⇒ Object
- #to_json(*args) ⇒ Object
Methods inherited from ApiModel
Constructor Details
#initialize(json) ⇒ Calendar
Returns a new instance of Calendar.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/gaah/calendar/calendar.rb', line 6 def initialize(json) store_json(json) @id = json['id'] @summary = json['summary'] @description = json['description'] @hidden = json['hidden'] @selected = json['selected'] @primary = json['primary'] @time_zone = json['timeZone'] @color_id = json['colorId'] @bg_color = json['backgroundColor'] @fg_color = json['foregroundColor'] @access_role = json['accessRole'] end |
Instance Attribute Details
#access_role ⇒ Object (readonly)
Returns the value of attribute access_role.
4 5 6 |
# File 'lib/gaah/calendar/calendar.rb', line 4 def access_role @access_role end |
#bg_color ⇒ Object (readonly)
Returns the value of attribute bg_color.
4 5 6 |
# File 'lib/gaah/calendar/calendar.rb', line 4 def bg_color @bg_color end |
#color_id ⇒ Object (readonly)
Returns the value of attribute color_id.
4 5 6 |
# File 'lib/gaah/calendar/calendar.rb', line 4 def color_id @color_id end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/gaah/calendar/calendar.rb', line 4 def description @description end |
#fg_color ⇒ Object (readonly)
Returns the value of attribute fg_color.
4 5 6 |
# File 'lib/gaah/calendar/calendar.rb', line 4 def fg_color @fg_color end |
#hidden ⇒ Object (readonly)
Returns the value of attribute hidden.
4 5 6 |
# File 'lib/gaah/calendar/calendar.rb', line 4 def hidden @hidden end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/gaah/calendar/calendar.rb', line 4 def id @id end |
#primary ⇒ Object (readonly)
Returns the value of attribute primary.
4 5 6 |
# File 'lib/gaah/calendar/calendar.rb', line 4 def primary @primary end |
#selected ⇒ Object (readonly)
Returns the value of attribute selected.
4 5 6 |
# File 'lib/gaah/calendar/calendar.rb', line 4 def selected @selected end |
#summary ⇒ Object (readonly)
Returns the value of attribute summary.
4 5 6 |
# File 'lib/gaah/calendar/calendar.rb', line 4 def summary @summary end |
#time_zone ⇒ Object (readonly)
Returns the value of attribute time_zone.
4 5 6 |
# File 'lib/gaah/calendar/calendar.rb', line 4 def time_zone @time_zone end |
Instance Method Details
#marshal_dump ⇒ Object
38 39 40 |
# File 'lib/gaah/calendar/calendar.rb', line 38 def marshal_dump [@id, @summary, @description, @hidden, @selected, @primary, @time_zone, @color_id, @bg_color, @fg_color, @access_role] end |
#marshal_load(array) ⇒ Object
42 43 44 |
# File 'lib/gaah/calendar/calendar.rb', line 42 def marshal_load(array) @id, @summary, @description, @hidden, @selected, @primary, @time_zone, @color_id, @bg_color, @fg_color, @access_role = array end |
#to_json(*args) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/gaah/calendar/calendar.rb', line 22 def to_json(*args) { id: @id, summary: @summary, description: @description, hidden: @hidden, selected: @selected, primary: @primary, time_zone: @time_zone, color_id: @color_id, bg_color: @bg_color, fg_color: @fg_color, access_role: @access_role, }.to_json end |