lib/reviewed/request.rb in reviewed-0.1.23 vs lib/reviewed/request.rb in reviewed-0.1.24

- old
+ new

@@ -2,14 +2,14 @@ class Request attr_accessor :client, :resource attr_reader :path def initialize(opts={}) - if opts[:resource].kind_of?(String) - @path = opts[:resource] - else + if opts[:resource].kind_of?(Class) @resource = opts[:resource] @path = @resource.path + else + @path = opts[:resource].to_s end @client = opts[:client] || Reviewed::Client.new end