class RPath::Named
Given a prior expression producing vertex array A, evaluates to an array containing the vertices in A with a certain name.
Public Class Methods
new(prior, name)
click to toggle source
@param [Expression] prior
An expression that evaluates to a vertex array
@param [String] name
Calls superclass method
# File lib/rpath/expressions.rb, line 188 def initialize(prior, name) super() @prior = prior @name = name end
Public Instance Methods
to_s()
click to toggle source
@return [String]
# File lib/rpath/expressions.rb, line 195 def to_s "#{@prior}#{@name}" end
Private Instance Methods
do_eval(graph, adapter)
click to toggle source
# File lib/rpath/expressions.rb, line 201 def do_eval(graph, adapter) vertices = @prior.eval(graph, adapter) vertices && vertices.select { |vertex| @name == adapter.name(vertex) } end