Class: Pragma::Filter::Boolean
- Defined in:
- lib/pragma/filter/boolean.rb
Instance Attribute Summary collapse
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
Attributes inherited from Base
Instance Method Summary collapse
- #apply(relation:) ⇒ Object
-
#initialize(scope:, **other) ⇒ Boolean
constructor
A new instance of Boolean.
Constructor Details
#initialize(scope:, **other) ⇒ Boolean
Returns a new instance of Boolean.
8 9 10 11 |
# File 'lib/pragma/filter/boolean.rb', line 8 def initialize(scope:, **other) super(**other) @scope = scope end |
Instance Attribute Details
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
6 7 8 |
# File 'lib/pragma/filter/boolean.rb', line 6 def scope @scope end |
Instance Method Details
#apply(relation:) ⇒ Object
13 14 15 |
# File 'lib/pragma/filter/boolean.rb', line 13 def apply(relation:, **) relation.public_send(scope) end |