Class: Tinypass::PricingPolicy
- Defined in:
- lib/tinypass/policies/pricing_policy.rb
Constant Summary
Constants inherited from Policy
Tinypass::Policy::DISCOUNT_PREVIOUS_PURCHASE, Tinypass::Policy::DISCOUNT_TOTAL_IN_PERIOD, Tinypass::Policy::POLICY_TYPE, Tinypass::Policy::REMINDER_METER_BY_COUNT, Tinypass::Policy::REMINDER_METER_BY_TIME, Tinypass::Policy::RESTRICT_MAX_PURCHASES, Tinypass::Policy::STRICT_METER_BY_TIME
Instance Attribute Summary collapse
-
#price_options ⇒ Object
readonly
Returns the value of attribute price_options.
Instance Method Summary collapse
- #has_active_options? ⇒ Boolean
-
#initialize(price_options) ⇒ PricingPolicy
constructor
A new instance of PricingPolicy.
Methods inherited from Policy
Constructor Details
#initialize(price_options) ⇒ PricingPolicy
5 6 7 |
# File 'lib/tinypass/policies/pricing_policy.rb', line 5 def initialize() = Array() end |
Instance Attribute Details
#price_options ⇒ Object (readonly)
Returns the value of attribute price_options.
3 4 5 |
# File 'lib/tinypass/policies/pricing_policy.rb', line 3 def end |
Instance Method Details
#has_active_options? ⇒ Boolean
9 10 11 |
# File 'lib/tinypass/policies/pricing_policy.rb', line 9 def .any? { |price_option| price_option.active? } end |