Class: Briskly::Scope
- Inherits:
-
Object
- Object
- Briskly::Scope
- Defined in:
- lib/briskly/scope.rb
Instance Attribute Summary collapse
-
#stores ⇒ Object
readonly
Returns the value of attribute stores.
Instance Method Summary collapse
-
#initialize(stores) ⇒ Scope
constructor
A new instance of Scope.
- #search(keyword, options = {}) ⇒ Object
Constructor Details
#initialize(stores) ⇒ Scope
Returns a new instance of Scope.
7 8 9 |
# File 'lib/briskly/scope.rb', line 7 def initialize(stores) @stores = stores end |
Instance Attribute Details
#stores ⇒ Object (readonly)
Returns the value of attribute stores.
5 6 7 |
# File 'lib/briskly/scope.rb', line 5 def stores @stores end |
Instance Method Details
#search(keyword, options = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/briskly/scope.rb', line 11 def search(keyword, = {}) result = {} @stores.each do |store| result[store.key] = store.search(keyword, ) end result end |