Class: Basecampx::Calendar
- Defined in:
- lib/basecampx/resources/calendar.rb
Instance Attribute Summary collapse
-
#accesses ⇒ Object
Returns the value of attribute accesses.
-
#calendar_events ⇒ Object
Returns the value of attribute calendar_events.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Resource
#delete, #initialize, parse, #update_attributes
Methods included from Relations
Constructor Details
This class inherits a constructor from Basecampx::Resource
Instance Attribute Details
#accesses ⇒ Object
Returns the value of attribute accesses.
4 5 6 |
# File 'lib/basecampx/resources/calendar.rb', line 4 def accesses @accesses end |
#calendar_events ⇒ Object
Returns the value of attribute calendar_events.
4 5 6 |
# File 'lib/basecampx/resources/calendar.rb', line 4 def calendar_events @calendar_events end |
#created_at ⇒ Object
Returns the value of attribute created_at.
4 5 6 |
# File 'lib/basecampx/resources/calendar.rb', line 4 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/basecampx/resources/calendar.rb', line 4 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/basecampx/resources/calendar.rb', line 4 def name @name end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
4 5 6 |
# File 'lib/basecampx/resources/calendar.rb', line 4 def updated_at @updated_at end |
Class Method Details
Instance Method Details
#save ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/basecampx/resources/calendar.rb', line 16 def save # PUT /calendars/1.json if self.id params = JSON.parse self.to_json params.delete 'id' Basecampx.put "calendars/#{self.id}.json", params else params = JSON.parse self.to_json Basecampx.post "calendars.json", params end end |