Class: Munificent::Bundle
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Munificent::Bundle
- Includes:
- AASM
- Defined in:
- app/models/munificent/bundle.rb
Instance Method Summary collapse
Methods inherited from ApplicationRecord
Instance Method Details
#highest_tier ⇒ Object
41 42 43 |
# File 'app/models/munificent/bundle.rb', line 41 def highest_tier bundle_tiers.max_by(&:price) end |
#lowest_tier ⇒ Object
45 46 47 |
# File 'app/models/munificent/bundle.rb', line 45 def lowest_tier bundle_tiers.min_by(&:price) end |
#total_value ⇒ Object
49 50 51 |
# File 'app/models/munificent/bundle.rb', line 49 def total_value highest_tier.price end |