Class: Spree::Countries::Find
- Inherits:
-
BaseFinder
- Object
- BaseFinder
- Spree::Countries::Find
- Defined in:
- app/finders/spree/countries/find.rb
Instance Attribute Summary
Attributes inherited from BaseFinder
Instance Method Summary collapse
- #call ⇒ Object
- #execute ⇒ Object
-
#initialize(scope:, params:) ⇒ Find
constructor
A new instance of Find.
Constructor Details
#initialize(scope:, params:) ⇒ Find
Returns a new instance of Find.
4 5 6 7 8 |
# File 'app/finders/spree/countries/find.rb', line 4 def initialize(scope:, params:) @scope = scope @shippable = String(params[:filter][:shippable]) unless params[:filter].nil? end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 |
# File 'app/finders/spree/countries/find.rb', line 10 def call Spree::Deprecation.warn(<<-DEPRECATION, caller) Spree::Countries::Find.new.call is deprecated and will be removed in Spree 5.0. Please use Spree::Countries::Find.new.execute instead DEPRECATION execute end |
#execute ⇒ Object
18 19 20 21 22 |
# File 'app/finders/spree/countries/find.rb', line 18 def execute countries = by_shippability(scope) countries end |