Class: Spree::Stores::FindCurrent
- Inherits:
-
Object
- Object
- Spree::Stores::FindCurrent
- Defined in:
- app/finders/spree/stores/find_current.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(scope: nil, url: nil) ⇒ FindCurrent
constructor
A new instance of FindCurrent.
Constructor Details
#initialize(scope: nil, url: nil) ⇒ FindCurrent
Returns a new instance of FindCurrent.
4 5 6 7 |
# File 'app/finders/spree/stores/find_current.rb', line 4 def initialize(scope: nil, url: nil) @scope = scope || Spree::Store @url = url end |
Instance Method Details
#execute ⇒ Object
9 10 11 |
# File 'app/finders/spree/stores/find_current.rb', line 9 def execute by_url(scope) || scope.default end |