Sha256: 9e1c51c2c7710d1c0d67519c42f2bc5691f079d0523ffe27d62fab9c832c1742
Contents?: true
Size: 748 Bytes
Versions: 7
Compression:
Stored size: 748 Bytes
Contents
module FbGraph2 class Edge module Comments def assign(attributes) super if attributes.include? :comments @_cached_comments = Collection.new attributes[:comments] end end def comments(params = {}) comments = if @_cached_comments.present? && params.blank? @_cached_comments else self.edge :comments, params end comments.collect do |comment| Comment.new(comment[:id], comment).authenticate self.access_token end end def comment!(params = {}) comment = self.post params, edge: :comments Comment.new(comment[:id], params.merge(comment)).authenticate self.access_token end end end end
Version data entries
7 entries across 7 versions & 1 rubygems