Class: Twobook::AccountQuery::AndQuery

Inherits:
Twobook::AccountQuery show all
Defined in:
lib/twobook/account_query.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#firstObject (readonly)

Returns the value of attribute first.



175
176
177
# File 'lib/twobook/account_query.rb', line 175

def first
  @first
end

#secondObject (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

Returns:

  • (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