Class: Twobook::AccountQuery::OrQuery

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) ⇒ OrQuery

Returns a new instance of OrQuery.



194
195
196
197
# File 'lib/twobook/account_query.rb', line 194

def initialize(first, second)
  @first = first
  @second = second
end

Instance Attribute Details

#firstObject (readonly)

Returns the value of attribute first.



192
193
194
# File 'lib/twobook/account_query.rb', line 192

def first
  @first
end

#secondObject (readonly)

Returns the value of attribute second.



192
193
194
# File 'lib/twobook/account_query.rb', line 192

def second
  @second
end

Instance Method Details

#none?Boolean

Returns:

  • (Boolean)


199
200
201
# File 'lib/twobook/account_query.rb', line 199

def none?
  @first.none? && @second.none?
end

#on(array) ⇒ Object



203
204
205
# File 'lib/twobook/account_query.rb', line 203

def on(array)
  @first.on(array) | @second.on(array)
end