Module: SmoothOperator::Operator::Base::ClassMethods

Defined in:
lib/smooth_operator/operator/base.rb

Instance Method Summary collapse

Instance Method Details

#delete(relative_path, options = {}) ⇒ Object



24
25
26
# File 'lib/smooth_operator/operator/base.rb', line 24

def delete(relative_path, options = {})
  make_the_call(:delete, relative_path, options)
end

#get(relative_path, options = {}) ⇒ Object



12
13
14
# File 'lib/smooth_operator/operator/base.rb', line 12

def get(relative_path, options = {})
  make_the_call(:get, relative_path, options)
end

#make_the_call(http_verb, relative_path, options = {}) ⇒ Object



28
29
30
31
32
# File 'lib/smooth_operator/operator/base.rb', line 28

def make_the_call(http_verb, relative_path, options = {})
  url = build_url(relative_path)
  options = query_string(options || {})
  http_handler_base.make_the_call(http_verb, url, options, get_basic_auth_credentials)
end

#post(relative_path, options = {}) ⇒ Object



16
17
18
# File 'lib/smooth_operator/operator/base.rb', line 16

def post(relative_path, options = {})
  make_the_call(:post, relative_path, options)
end

#put(relative_path, options = {}) ⇒ Object



20
21
22
# File 'lib/smooth_operator/operator/base.rb', line 20

def put(relative_path, options = {})
  make_the_call(:put, relative_path, options)
end

#query_string(options) ⇒ Object



34
35
36
# File 'lib/smooth_operator/operator/base.rb', line 34

def query_string(options)
  options
end