Method: RPath::Where#initialize

Defined in:
lib/rpath/expressions.rb

#initialize(prior, conditions) ⇒ Where #initialize(prior) {|vertex| ... } ⇒ Where

Returns a new instance of Where.

Overloads:

  • #initialize(prior, conditions) ⇒ Where

    Parameters:

    • prior (Expression)

      An expression that evaluates to a vertex array

    • conditions (Hash{Symbol => Object})

      A map of attribute keys to values.

  • #initialize(prior) {|vertex| ... } ⇒ Where

    Parameters:

    • prior (Expression)

      An expression that evaluates to a vertex array

    Yield Parameters:

    • vertex (Object)

    Yield Returns:

    • (Boolean)

      Whether the vertex should be selected



222
223
224
225
226
227
# File 'lib/rpath/expressions.rb', line 222

def initialize(prior, conditions = {}, &selector)
  super()
  @prior = prior
  @selector = block_given? ? selector : nil
  @conditions = block_given? ? nil : conditions
end