Module: Driftrock::Service::DriftrockModel::ClassMethods

Defined in:
lib/driftrock-service/driftrock_model.rb

Instance Method Summary collapse

Instance Method Details

#api_pathObject



66
67
68
69
# File 'lib/driftrock-service/driftrock_model.rb', line 66

def api_path
  @api_path ||= "/"
  @api_path
end

#model_get(path, opts = {}, root_path = api_path) ⇒ Object



79
80
81
# File 'lib/driftrock-service/driftrock_model.rb', line 79

def model_get(path, opts={}, root_path=api_path)
  get(root_path+path, opts)
end

#model_post(path, opts = {}, root_path = api_path) ⇒ Object



71
72
73
# File 'lib/driftrock-service/driftrock_model.rb', line 71

def model_post(path, opts={}, root_path=api_path)
  post(root_path+path, opts)
end

#model_put(path, opts = {}, root_path = api_path) ⇒ Object



75
76
77
# File 'lib/driftrock-service/driftrock_model.rb', line 75

def model_put(path, opts={}, root_path=api_path)
  put(root_path+path, opts)
end

#set_api_path(path) ⇒ Object



62
63
64
# File 'lib/driftrock-service/driftrock_model.rb', line 62

def set_api_path(path)
  @api_path = path
end