Sha256: 19d593e0961a4f6492aaa77c8452f358afad28936a5cf54fdaf8d7fa0034b0e0

Contents?: true

Size: 568 Bytes

Versions: 14

Compression:

Stored size: 568 Bytes

Contents

module FbGraph2
  class Edge
    module Picture
      def assign(attributes)
        super
        if attributes.include? :picture
          @_cached_picture = attributes[:picture]
        end
      end

      def picture(*args)
        params = args.extract_options!
        params[:type] = args.first if args.first
        picture = if @_cached_picture.present? && params.blank?
          @_cached_picture
        else
          self.get params.merge(redirect: false), edge: :picture
        end
        Struct::Picture.new picture[:data]
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fb_graph2-1.3.0 lib/fb_graph2/edge/picture.rb
fb_graph2-1.2.0 lib/fb_graph2/edge/picture.rb
fb_graph2-1.1.1 lib/fb_graph2/edge/picture.rb
fb_graph2-1.1.0 lib/fb_graph2/edge/picture.rb
fb_graph2-1.0.1 lib/fb_graph2/edge/picture.rb
fb_graph2-1.0.0 lib/fb_graph2/edge/picture.rb
fb_graph2-0.9.1 lib/fb_graph2/edge/picture.rb
fb_graph2-0.9.0 lib/fb_graph2/edge/picture.rb
fb_graph2-0.8.0 lib/fb_graph2/edge/picture.rb
fb_graph2-0.7.9 lib/fb_graph2/edge/picture.rb
fb_graph2-0.7.8 lib/fb_graph2/edge/picture.rb
fb_graph2-0.7.7 lib/fb_graph2/edge/picture.rb
fb_graph2-0.7.6 lib/fb_graph2/edge/picture.rb
fb_graph2-0.7.5 lib/fb_graph2/edge/picture.rb