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