Class: Forecasting::Models::Role
- Inherits:
-
ForecastRecord
- Object
- Base
- ForecastRecord
- Forecasting::Models::Role
- Defined in:
- lib/forecasting/models/role.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from ForecastRecord
#create, #delete, #fetch, get, #save, #type, #update
Methods inherited from Base
attributed, #initialize, modeled, #to_hash
Constructor Details
This class inherits a constructor from Forecasting::Models::Base
Instance Method Details
#path ⇒ Object
10 11 12 |
# File 'lib/forecasting/models/role.rb', line 10 def path @attributes['id'].nil? ? "roles" : "roles/#{@attributes['id']}" end |
#people ⇒ Object
20 21 22 23 24 |
# File 'lib/forecasting/models/role.rb', line 20 def people person_ids.map do |person_id| forecast_client.person(id: person_id) end end |
#placeholders ⇒ Object
14 15 16 17 18 |
# File 'lib/forecasting/models/role.rb', line 14 def placeholders placeholder_ids.map do |placeholder_id| forecast_client.placeholder(id: placeholder_id) end end |