Class: FbGraph::Event
- Includes:
- Connections::Attending, Connections::Declined, Connections::Feed, Connections::Invited, Connections::Maybe, Connections::Noreply, Connections::Picture
- Defined in:
- lib/fb_graph/event.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#end_time ⇒ Object
Returns the value of attribute end_time.
-
#location ⇒ Object
Returns the value of attribute location.
-
#name ⇒ Object
Returns the value of attribute name.
-
#owner ⇒ Object
Returns the value of attribute owner.
-
#privacy ⇒ Object
Returns the value of attribute privacy.
-
#start_time ⇒ Object
Returns the value of attribute start_time.
-
#updated_time ⇒ Object
Returns the value of attribute updated_time.
-
#venue ⇒ Object
Returns the value of attribute venue.
Attributes inherited from Node
#access_token, #endpoint, #identifier
Instance Method Summary collapse
-
#initialize(identifier, options = {}) ⇒ Event
constructor
A new instance of Event.
Methods included from Connections::Picture
Methods included from Connections::Declined
Methods included from Connections::Attending
Methods included from Connections::Invited
Methods included from Connections::Maybe
Methods included from Connections::Noreply
Methods included from Connections::Feed
Methods inherited from Node
Methods included from Comparison
Constructor Details
#initialize(identifier, options = {}) ⇒ Event
Returns a new instance of Event.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/fb_graph/event.rb', line 13 def initialize(identifier, = {}) super if (owner = [:owner]) @owner = FbGraph::User.new(owner.delete(:id), owner) end @name = [:name] @description = [:description] @location = [:location] @privacy = [:privacy] if (start_time = [:start_time]) @start_time = case start_time when String Time.parse(start_time).utc when Fixnum Time.at(start_time).utc end end if (end_time = [:end_time]) @end_time = case end_time when String Time.parse(end_time).utc when Fixnum Time.at(end_time).utc end end if [:venue] @venue = FbGraph::Venue.new([:venue]) end if [:updated_time] @updated_time = Time.parse([:updated_time]).utc end end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
11 12 13 |
# File 'lib/fb_graph/event.rb', line 11 def description @description end |
#end_time ⇒ Object
Returns the value of attribute end_time.
11 12 13 |
# File 'lib/fb_graph/event.rb', line 11 def end_time @end_time end |
#location ⇒ Object
Returns the value of attribute location.
11 12 13 |
# File 'lib/fb_graph/event.rb', line 11 def location @location end |
#name ⇒ Object
Returns the value of attribute name.
11 12 13 |
# File 'lib/fb_graph/event.rb', line 11 def name @name end |
#owner ⇒ Object
Returns the value of attribute owner.
11 12 13 |
# File 'lib/fb_graph/event.rb', line 11 def owner @owner end |
#privacy ⇒ Object
Returns the value of attribute privacy.
11 12 13 |
# File 'lib/fb_graph/event.rb', line 11 def privacy @privacy end |
#start_time ⇒ Object
Returns the value of attribute start_time.
11 12 13 |
# File 'lib/fb_graph/event.rb', line 11 def start_time @start_time end |
#updated_time ⇒ Object
Returns the value of attribute updated_time.
11 12 13 |
# File 'lib/fb_graph/event.rb', line 11 def updated_time @updated_time end |
#venue ⇒ Object
Returns the value of attribute venue.
11 12 13 |
# File 'lib/fb_graph/event.rb', line 11 def venue @venue end |