Sha256: cf0c477b396d0776063fe8dc6056d080186709299813c7c17a7cfdf5b98b34bf

Contents?: true

Size: 598 Bytes

Versions: 6

Compression:

Stored size: 598 Bytes

Contents

module FbGraph
  class Note < Node
    include Connections::Comments

    attr_accessor :from, :subject, :message, :created_time, :updated_time

    def initialize(identifier, options = {})
      super
      if (from = options[:from])
        @from = if from[:category]
          FbGraph::Page.new(from.delete(:id), from) 
        else
          FbGraph::User.new(from.delete(:id), from) 
        end
      end
      @subject      = options[:subject]
      @message      = options[:message]
      @created_time = options[:created_time]
      @updated_time = options[:updated_time]
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fb_graph-0.0.7 lib/fb_graph/note.rb
fb_graph-0.0.6 lib/fb_graph/note.rb
fb_graph-0.0.5 lib/fb_graph/note.rb
fb_graph-0.0.4 lib/fb_graph/note.rb
fb_graph-0.0.3 lib/fb_graph/note.rb
fb_graph-0.0.2 lib/fb_graph/note.rb