Module: HTTParty
- Extended by:
- HTTParty
- Included in:
- HTTParty
- Defined in:
- lib/lock-o-motion/mocks/httparty.rb,
lib/lock-o-motion/mocks/httparty.rb
Defined Under Namespace
Classes: Response
Instance Method Summary collapse
- #base_uri(u) ⇒ Object
- #basic_auth(user, password) ⇒ Object
- #delete(path, options = {}, &block) ⇒ Object
- #format(f) ⇒ Object
- #get(path, options = {}, &block) ⇒ Object
- #included(base) ⇒ Object
- #post(path, options = {}, &block) ⇒ Object
- #put(path, options = {}, &block) ⇒ Object
Instance Method Details
#base_uri(u) ⇒ Object
12 13 14 |
# File 'lib/lock-o-motion/mocks/httparty.rb', line 12 def base_uri(u) @base_uri = u.sub(/\/$/, "") end |
#basic_auth(user, password) ⇒ Object
16 17 18 |
# File 'lib/lock-o-motion/mocks/httparty.rb', line 16 def basic_auth(user, password) @basic_auth = [user, password] end |
#delete(path, options = {}, &block) ⇒ Object
32 33 34 |
# File 'lib/lock-o-motion/mocks/httparty.rb', line 32 def delete(path, = {}, &block) send_request path, :delete end |
#format(f) ⇒ Object
8 9 10 |
# File 'lib/lock-o-motion/mocks/httparty.rb', line 8 def format(f) @format = f end |
#get(path, options = {}, &block) ⇒ Object
20 21 22 |
# File 'lib/lock-o-motion/mocks/httparty.rb', line 20 def get(path, = {}, &block) send_request path, :get end |
#included(base) ⇒ Object
4 5 6 |
# File 'lib/lock-o-motion/mocks/httparty.rb', line 4 def included(base) base.extend self end |
#post(path, options = {}, &block) ⇒ Object
24 25 26 |
# File 'lib/lock-o-motion/mocks/httparty.rb', line 24 def post(path, = {}, &block) send_request path, :post end |
#put(path, options = {}, &block) ⇒ Object
28 29 30 |
# File 'lib/lock-o-motion/mocks/httparty.rb', line 28 def put(path, = {}, &block) send_request path, :put end |