Sha256: affddf992b9ecd0bbf07d8ea125980caefa43be5ff484f7a5a29263d4cf22baa
Contents?: true
Size: 858 Bytes
Versions: 52
Compression:
Stored size: 858 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) || 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
52 entries across 52 versions & 1 rubygems