Class: RPath::Named

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

Overview

Given a prior expression producing vertex array A, evaluates to an array containing the vertices in A with a certain name.

Instance Method Summary collapse

Methods inherited from VertexArrayExpression

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

Methods inherited from Expression

#eval

Constructor Details

#initialize(prior, name) ⇒ Named

Returns a new instance of Named.

Parameters:

  • prior (Expression)

    An expression that evaluates to a vertex array

  • name (String)


188
189
190
191
192
# File 'lib/rpath/expressions.rb', line 188

def initialize(prior, name)
  super()
  @prior = prior
  @name = name
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)


195
196
197
# File 'lib/rpath/expressions.rb', line 195

def to_s
  "#{@prior}#{@name}"
end