Class: NexosisApi::CalendarJoinTarget
- Inherits:
-
Object
- Object
- NexosisApi::CalendarJoinTarget
- Defined in:
- lib/nexosis_api/calendar_jointarget.rb
Overview
Specifies the details of a calendar data source to join to
Instance Attribute Summary collapse
-
#name ⇒ String
The name of a well-known Nexosis calendar.
-
#timezone ⇒ String
tz-db string name of the timezone of the calendar.
-
#url ⇒ String
The location of a public iCal to download as the datasource.
Instance Method Summary collapse
-
#initialize(cal_join_hash) ⇒ CalendarJoinTarget
constructor
A new instance of CalendarJoinTarget.
-
#to_hash ⇒ Object
custom hash to match with api requests.
Constructor Details
#initialize(cal_join_hash) ⇒ CalendarJoinTarget
Returns a new instance of CalendarJoinTarget.
6 7 8 9 10 |
# File 'lib/nexosis_api/calendar_jointarget.rb', line 6 def initialize(cal_join_hash) @url = cal_join_hash['url'] unless cal_join_hash.nil? @name = cal_join_hash['name'] unless cal_join_hash.nil? @timezone = cal_join_hash['timeZone'] unless cal_join_hash.nil? end |
Instance Attribute Details
#name ⇒ String
The name of a well-known Nexosis calendar.
19 20 21 |
# File 'lib/nexosis_api/calendar_jointarget.rb', line 19 def name @name end |
#timezone ⇒ String
tz-db string name of the timezone of the calendar
24 25 26 |
# File 'lib/nexosis_api/calendar_jointarget.rb', line 24 def timezone @timezone end |
#url ⇒ String
The location of a public iCal to download as the datasource
14 15 16 |
# File 'lib/nexosis_api/calendar_jointarget.rb', line 14 def url @url end |
Instance Method Details
#to_hash ⇒ Object
custom hash to match with api requests
27 28 29 30 31 32 33 |
# File 'lib/nexosis_api/calendar_jointarget.rb', line 27 def to_hash hash = { 'calendar' => {} } hash['calendar'].store 'url', url unless url.nil? hash['calendar'].store 'name', name unless name.nil? hash['calendar'].store 'timeZone', name unless timezone.nil? hash end |