Module: CheeseCloth

Extended by:
ActiveSupport::Concern
Defined in:
lib/cheesecloth.rb,
lib/cheesecloth/errors.rb,
lib/cheesecloth/filter.rb,
lib/cheesecloth/version.rb,
lib/cheesecloth/wrapper.rb,
lib/cheesecloth/filter_list.rb

Defined Under Namespace

Classes: Filter, FilterList, MissingScopeError, Wrapper

Constant Summary collapse

VERSION =
"0.1.0"

Instance Method Summary collapse

Instance Method Details

#filtered_scope(scope: nil) ⇒ Object



35
36
37
38
39
# File 'lib/cheesecloth.rb', line 35

def filtered_scope(scope: nil)
  self.scope_override = scope
  cheesecloth_wrapper.prepare_and_run(self)
  self.scope
end

#scopeObject



31
32
33
# File 'lib/cheesecloth.rb', line 31

def scope
  @scope || scope_override || cheesecloth_wrapper.scope
end