Skip to content

Commit

Permalink
invocations from the start point should be immutable
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermesilveira committed Oct 21, 2010
1 parent af39078 commit 1065084
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/restfulie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,19 @@ module Restfulie

# creates a new entry point for executing requests
def self.at(uri)
Restfulie.using {
recipe
follow_link
request_marshaller
verb_request
}.at(uri)
Restfulie.use.at(uri)
end

def self.using(&block)
RestfulieUsing.new.instance_eval(&block)
end

def self.use(&block)
Restfulie::Client::Dsl.new.instance_eval(&block)
if block_given?
Restfulie::Client::Dsl.new.instance_eval(&block)
else
Restfulie::Client::Dsl.new
end
end

end
Expand Down
1 change: 1 addition & 0 deletions lib/restfulie/client/feature.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module Restfulie::Client
module Feature
module Base
def at(uri)
self
end
end
end
Expand Down
File renamed without changes.

0 comments on commit 1065084

Please sign in to comment.