Method: FbGraph::Doc#initialize
- Defined in:
- lib/fb_graph/doc.rb
#initialize(identifier, attributes = {}) ⇒ Doc
Returns a new instance of Doc.
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/fb_graph/doc.rb', line 5 def initialize(identifier, attributes = {}) super @from = if attributes[:from] User.new(attributes[:from][:id], attributes[:from]) end @subject = attributes[:subject] @icon = attributes[:icon] @revision = attributes[:revision] @updated_time = if attributes[:updated_time] Time.parse(attributes[:updated_time]).utc end end |