lib/pmp/client.rb in pmp-0.1.0 vs lib/pmp/client.rb in pmp-0.1.1
- old
+ new
@@ -3,15 +3,20 @@
module PMP
class Client
include Configuration
+ def initialize(options={}, &block)
+ apply_configuration(options)
+ yield(self) if block_given?
+ end
+
def token(opts={})
- PMP::Token.new(opts).get_token
+ PMP::Token.new(options.merge(opts)).get_token
end
def root(opts={}, &block)
- PMP::CollectionDocument.new(opts, &block)
+ PMP::CollectionDocument.new(options.merge(opts), &block)
end
end
end