lib/restful_adhearsion.rb in restful_adhearsion-0.1.3 vs lib/restful_adhearsion.rb in restful_adhearsion-0.2.0

- old
+ new

@@ -8,20 +8,20 @@ :host => "localhost", :port => "5000", :path_nesting => "/" } - def initialize(options={}) + def initialize(options = {}) @options = DEFAULT_OPTIONS.merge options @path_nesting = @options.delete :path_nesting @host = @options.delete :host @port = @options.delete :port @url_beginning = "http://#{@host}:#{@port}#{@path_nesting}" end def method_missing(method_name, *args) - JSON.parse RestClient::Resource.new(@url_beginning + method_name.to_s, @options).post(args.to_json).body + JSON.parse RestClient::Resource.new("#{@url_beginning}restful_#{method_name.to_s}", @options).post(args.to_json) end -end \ No newline at end of file +end