Exception: CheeseCloth::MissingScopeError
- Inherits:
-
StandardError
- Object
- StandardError
- CheeseCloth::MissingScopeError
- Defined in:
- lib/cheesecloth/errors.rb
Instance Method Summary collapse
-
#initialize(klass) ⇒ MissingScopeError
constructor
A new instance of MissingScopeError.
- #message ⇒ Object
Constructor Details
#initialize(klass) ⇒ MissingScopeError
Returns a new instance of MissingScopeError.
5 6 7 |
# File 'lib/cheesecloth/errors.rb', line 5 def initialize(klass) @klass = klass end |
Instance Method Details
#message ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/cheesecloth/errors.rb', line 9 def " Was unable to determine the base scope. Perhaps you forgot to call `scope`?\"\n\n Try something like:\n\n class \#{@klass.name || 'FooFilterer'}\n include CheeseCloth\n\n scope -> { Model.all }\n end\n MSG\nend\n".strip_heredoc |