Sha256: 80f6f3eae2dbfd07b3e98112b25c41b4cc27b924ce1426ee84ccecc61af1ec2b
Contents?: true
Size: 899 Bytes
Versions: 15
Compression:
Stored size: 899 Bytes
Contents
module FbGraph class Connection < Collection attr_accessor :collection, :connection, :owner, :options def initialize(owner, connection, options = {}) @owner = owner @options = options @connection = connection @collection = options.delete(:collection) || FbGraph::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_ = {}) puts self.options.inspect 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
15 entries across 15 versions & 2 rubygems