Class: Forecast::API::Projects
Instance Attribute Summary
Attributes inherited from Base
#credentials
Instance Method Summary
collapse
#all, #find
Methods inherited from Base
api_model, #initialize
Instance Method Details
#create ⇒ Object
18
|
# File 'lib/forecast/api/projects.rb', line 18
def create ; raise "not implemented" ; end
|
#delete ⇒ Object
20
|
# File 'lib/forecast/api/projects.rb', line 20
def delete ; raise "not implemented" ; end
|
#find_by_harvest_id(harvest_project_id) ⇒ Object
8
9
10
11
12
13
14
15
16
|
# File 'lib/forecast/api/projects.rb', line 8
def find_by_harvest_id(harvest_project_id)
selected = self.all.select{|x| x.harvest_id == harvest_project_id}
if selected.size > 1
raise "Forecasted::Error - more than 1 harvest_id forecast project"
else
return selected.first
end
end
|
#update ⇒ Object
19
|
# File 'lib/forecast/api/projects.rb', line 19
def update ; raise "not implemented" ; end
|