Class: PlanningCenter::Plan
- Includes:
- LazyAttributes
- Defined in:
- lib/planning_center/plan.rb
Instance Attribute Summary
Attributes included from LazyAttributes
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods included from LazyAttributes
Methods inherited from Base
#initialize, #method_missing, #respond_to_missing?
Constructor Details
This class inherits a constructor from PlanningCenter::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class PlanningCenter::Base
Class Method Details
.find(id, client) ⇒ Object
31 32 33 34 35 36 |
# File 'lib/planning_center/plan.rb', line 31 def self.find(id, client) attrs = client.get("/plans/#{id}.json") plan = new(attrs, client) plan.load_state = :loaded plan end |
.find_all_for_service_type(service_type_id, client) ⇒ Object
26 27 28 29 |
# File 'lib/planning_center/plan.rb', line 26 def self.find_all_for_service_type(service_type_id, client) plans = client.get("/service_types/#{service_type_id}/plans.json") plans.map { |plan| new(plan, client) } end |