Module: SelectorQuery
- Included in:
- Selector
- Defined in:
- tomes/components/selector/selector_query.rb
Overview
All methods for checking the state of the Selector.
Instance Method Summary collapse
-
#blank? ⇒ Boolean
Checks if #memory is nil.
-
#empty? ⇒ Boolean
Checks if #possession is nil.
-
#has?(this) ⇒ Boolean
Checks if #possession has the given object.
-
#knows?(this) ⇒ Boolean
Checks if #memory contains the given data.
Instance Method Details
#blank? ⇒ Boolean
Checks if #memory is nil.
27 28 29 |
# File 'tomes/components/selector/selector_query.rb', line 27 def blank? memory.nil? end |
#empty? ⇒ Boolean
Checks if #possession is nil.
14 15 16 |
# File 'tomes/components/selector/selector_query.rb', line 14 def empty? possession.nil? end |
#has?(this) ⇒ Boolean
Checks if #possession has the given object.
8 9 10 |
# File 'tomes/components/selector/selector_query.rb', line 8 def has?(this) possession == this end |
#knows?(this) ⇒ Boolean
Checks if #memory contains the given data.
21 22 23 |
# File 'tomes/components/selector/selector_query.rb', line 21 def knows?(this) memory == this end |