Class: RPath::VertexExpression Abstract
- Inherits:
-
Expression
- Object
- Expression
- RPath::VertexExpression
- Defined in:
- lib/rpath/expressions.rb
Overview
This class is abstract.
An expression that evaluates to a vertex V
Instance Method Summary collapse
-
#[](subscript) ⇒ Attribute
Returns an expression that evaluates to the value of an attribute of V.
-
#adjacent ⇒ Adjacent
Returns an expression that evaluates to V’s adjacent vertices.
-
#content ⇒ Content
Returns an expression that evaluates to V’s content.
-
#method_missing(name, *args, &block) ⇒ Named
Returns an expression that evaluates to V’s adjacent vertices named
name
.
Methods inherited from Expression
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
Instance Method Details
#[](subscript) ⇒ Attribute
Returns an expression that evaluates to the value of an attribute of V
68 69 70 71 72 73 |
# File 'lib/rpath/expressions.rb', line 68 def [](subscript) unless subscript.is_a?(String) || subscript.is_a?(Symbol) raise ArgumentError, "Subscript for expression producing a vertex must by a String or Symbol" end Attribute.new self, subscript end |