Class: FbGraph::Project
Instance Attribute Summary collapse
-
#end_date ⇒ Object
Returns the value of attribute end_date.
-
#start_date ⇒ Object
Returns the value of attribute start_date.
Attributes inherited from Page
#can_post, #category, #checkin_count, #company_overview, #created_time, #founded, #general_info, #is_community_page, #like_count, #link, #location, #mission, #name, #products, #release_date, #username, #website, #websites, #with
Attributes inherited from Node
#access_token, #endpoint, #identifier
Instance Method Summary collapse
-
#initialize(identifier, attributes = {}) ⇒ Project
constructor
A new instance of Project.
Methods included from Searchable
Methods included from Connections::Videos
Methods included from Connections::Tagged
Methods included from Connections::Statuses
Methods included from Connections::Posts
Methods included from Connections::Picture
Methods included from Connections::Photos
Methods included from Connections::Notes
Methods included from Connections::Links
Methods included from Connections::Insights
Methods included from Connections::Groups
Methods included from Connections::Feed
Methods included from Connections::Events
Methods included from Connections::Checkins
Methods included from Connections::Albums
Methods inherited from Node
#connection, #destroy, fetch, #fetch
Methods included from Comparison
Constructor Details
#initialize(identifier, attributes = {}) ⇒ Project
Returns a new instance of Project.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/fb_graph/project.rb', line 5 def initialize(identifier, attributes = {}) super if attributes[:start_date] year, month = attributes[:start_date].split('-').collect(&:to_i) @start_date = if month.blank? || month == 0 Date.new(year) else Date.new(year, month) end end if attributes[:end_date] year, month = attributes[:end_date].split('-').collect(&:to_i) @end_date = if month.blank? || month == 0 Date.new(year) else Date.new(year, month) end end end |
Instance Attribute Details
#end_date ⇒ Object
Returns the value of attribute end_date.
3 4 5 |
# File 'lib/fb_graph/project.rb', line 3 def end_date @end_date end |
#start_date ⇒ Object
Returns the value of attribute start_date.
3 4 5 |
# File 'lib/fb_graph/project.rb', line 3 def start_date @start_date end |