lib/fb_graph/node.rb in fb_graph-0.5.0 vs lib/fb_graph/node.rb in fb_graph-0.6.0

- old
+ new

@@ -1,8 +1,8 @@ module FbGraph class Node - include FbGraph::Comparison + include Comparison attr_accessor :identifier, :endpoint, :access_token def initialize(identifier, options = {}) @identifier = identifier @@ -20,11 +20,11 @@ new(identifier).fetch(options) end def connection(connection, options = {}) collection = FbGraph::Collection.new(get(options.merge(:connection => connection))) - Connection.new(self, connection, collection) + Connection.new(self, connection, options.merge(:collection => collection)) end def destroy(options = {}) options[:access_token] ||= self.access_token if self.access_token delete(options) @@ -63,10 +63,10 @@ def build_endpoint(params = {}) _endpoint_ = if params[:connection] File.join(self.endpoint, params.delete(:connection).to_s) else - self.endpoint + params[:endpoint] || self.endpoint end params.delete_if do |k, v| v.blank? end \ No newline at end of file