Sha256: e4e58eb6cec97b073b4045f539225ddf83496370fef2d0f9aa5f177d6ac4e328
Contents?: true
Size: 904 Bytes
Versions: 13
Compression:
Stored size: 904 Bytes
Contents
module FbGraph class Connection < Collection attr_accessor :collection, :connection, :owner, :options delegate :total_count, :to => :collection def initialize(owner, connection, options = {}) @owner = owner @options = options @connection = connection @collection = options.delete(:collection) || Collection.new replace collection end def next(_options_ = {}) if self.collection.next.present? self.owner.send(self.connection, self.options.merge(_options_).merge(self.collection.next)) else self.class.new(self.owner, self.connection) end end def previous(_options_ = {}) if self.collection.previous.present? self.owner.send(self.connection, self.options.merge(_options_).merge(self.collection.previous)) else self.class.new(self.owner, self.connection) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems