Module: SolidusFriendlyPromotions::Conditions::LineItemLevelCondition

Included in:
LineItemOptionValue, LineItemProduct, LineItemTaxon
Defined in:
app/models/concerns/solidus_friendly_promotions/conditions/line_item_level_condition.rb

Instance Method Summary collapse

Instance Method Details

#applicable?(promotable) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'app/models/concerns/solidus_friendly_promotions/conditions/line_item_level_condition.rb', line 6

def applicable?(promotable)
  promotable.is_a?(Spree::LineItem)
end

#levelObject



10
11
12
# File 'app/models/concerns/solidus_friendly_promotions/conditions/line_item_level_condition.rb', line 10

def level
  :line_item
end