Class: Planify::User::PlanInfo
- Inherits:
-
Object
- Object
- Planify::User::PlanInfo
- Includes:
- Mongoid::Document
- Defined in:
- lib/planify/user/plan_info.rb
Instance Method Summary collapse
Instance Method Details
#has_overrides? ⇒ Boolean
13 14 15 |
# File 'lib/planify/user/plan_info.rb', line 13 def has_overrides? limit_overrides.present? || feature_overrides.present? end |
#overrides_as_plan ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/planify/user/plan_info.rb', line 17 def overrides_as_plan Plan.new.tap do |p| limit_overrides.try(:each) do |klass, limit| p.max klass, limit end feature_overrides.try(:each) do |f, enabled| p.feature f, enabled end end end |