Class: Twobook::AccountQuery::AndQuery
- Inherits:
-
Twobook::AccountQuery
- Object
- Twobook::AccountQuery
- Twobook::AccountQuery::AndQuery
- Defined in:
- lib/twobook/account_query.rb
Instance Attribute Summary collapse
-
#first ⇒ Object
readonly
Returns the value of attribute first.
-
#second ⇒ Object
readonly
Returns the value of attribute second.
Instance Method Summary collapse
-
#initialize(first, second) ⇒ AndQuery
constructor
A new instance of AndQuery.
- #none? ⇒ Boolean
- #on(array) ⇒ Object
Methods inherited from Twobook::AccountQuery
#after, #and, named, #named, none, #none, #or, where, #where
Constructor Details
#initialize(first, second) ⇒ AndQuery
Returns a new instance of AndQuery.
177 178 179 180 |
# File 'lib/twobook/account_query.rb', line 177 def initialize(first, second) @first = first @second = second end |
Instance Attribute Details
#first ⇒ Object (readonly)
Returns the value of attribute first.
175 176 177 |
# File 'lib/twobook/account_query.rb', line 175 def first @first end |
#second ⇒ Object (readonly)
Returns the value of attribute second.
175 176 177 |
# File 'lib/twobook/account_query.rb', line 175 def second @second end |
Instance Method Details
#none? ⇒ Boolean
186 187 188 |
# File 'lib/twobook/account_query.rb', line 186 def none? @first.none? || @second.none? end |
#on(array) ⇒ Object
182 183 184 |
# File 'lib/twobook/account_query.rb', line 182 def on(array) @first.on(array) & @second.on(array) end |