Class: RPath::Adjacent

Inherits:
VertexArrayExpression show all
Defined in:
lib/rpath/expressions.rb

Overview

Given a prior expression producing vertex V, evaluates to an array containing V’s adjacent vertices.

Instance Method Summary collapse

Methods inherited from VertexArrayExpression

#[], #method_missing, #named, #where

Methods inherited from Expression

#eval

Constructor Details

#initialize(prior) ⇒ Adjacent

Returns a new instance of Adjacent.

Parameters:

  • prior (Expression)

    An expression that evaluates to a vertex



163
164
165
166
# File 'lib/rpath/expressions.rb', line 163

def initialize(prior)
  super()
  @prior = prior
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RPath::VertexArrayExpression

Instance Method Details

#to_sString

Returns:

  • (String)


169
170
171
# File 'lib/rpath/expressions.rb', line 169

def to_s
  "#{@prior}."
end