Class: FbGraph::Milestone
Instance Attribute Summary (collapse)
-
- (Object) created_time
Returns the value of attribute created_time.
-
- (Object) description
Returns the value of attribute description.
-
- (Object) end_time
Returns the value of attribute end_time.
-
- (Object) from
Returns the value of attribute from.
-
- (Object) start_time
Returns the value of attribute start_time.
-
- (Object) title
Returns the value of attribute title.
-
- (Object) updated_time
Returns the value of attribute updated_time.
Attributes inherited from Node
#access_token, #endpoint, #identifier, #raw_attributes
Instance Method Summary (collapse)
-
- (Milestone) initialize(identifier, attributes = {})
constructor
A new instance of Milestone.
Methods inherited from Node
#connection, #destroy, fetch, #fetch, #update
Methods included from Comparison
Constructor Details
- (Milestone) initialize(identifier, attributes = {})
A new instance of Milestone
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/fb_graph/milestone.rb', line 5 def initialize(identifier, attributes = {}) super if (from = attributes[:from]) @from = Page.new from[:id], from end [:title, :description].each do |key| self.send :#{key}=", attributes[key] end [:created_time, :updated_time, :start_time, :end_time].each do |key| if (value = attributes[key]) time = case value when String Time.parse(value) else value end self.send :#{key}=", time end end end |
Instance Attribute Details
- (Object) created_time
Returns the value of attribute created_time
3 4 5 |
# File 'lib/fb_graph/milestone.rb', line 3 def created_time @created_time end |
- (Object) description
Returns the value of attribute description
3 4 5 |
# File 'lib/fb_graph/milestone.rb', line 3 def description @description end |
- (Object) end_time
Returns the value of attribute end_time
3 4 5 |
# File 'lib/fb_graph/milestone.rb', line 3 def end_time @end_time end |
- (Object) from
Returns the value of attribute from
3 4 5 |
# File 'lib/fb_graph/milestone.rb', line 3 def from @from end |
- (Object) start_time
Returns the value of attribute start_time
3 4 5 |
# File 'lib/fb_graph/milestone.rb', line 3 def start_time @start_time end |
- (Object) title
Returns the value of attribute title
3 4 5 |
# File 'lib/fb_graph/milestone.rb', line 3 def title @title end |
- (Object) updated_time
Returns the value of attribute updated_time
3 4 5 |
# File 'lib/fb_graph/milestone.rb', line 3 def updated_time @updated_time end |