Class: RPath::VertexArrayExpression Abstract
- Inherits:
-
Expression
- Object
- Expression
- RPath::VertexArrayExpression
- Defined in:
- lib/rpath/expressions.rb
Overview
This class is abstract.
An expression that evaluates to a vertex array A
Instance Method Summary collapse
- #[](subscript) ⇒ Object
- #method_missing(name, *args, &block) ⇒ Object
-
#named(name) ⇒ Named
Returns an expression that evaluates to the vertices in A named
name
. -
#where(*args, &block) ⇒ Where
Returns an expression that evaluates to the vertices in A meeting certain conditions.
Methods inherited from Expression
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
137 138 139 |
# File 'lib/rpath/expressions.rb', line 137 def method_missing(name, *args, &block) self[0].send name, *args, &block end |
Instance Method Details
#[](index) ⇒ At #[](conditions) ⇒ Where #[](attribute) ⇒ Attribute
121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/rpath/expressions.rb', line 121 def [](subscript) case subscript when Integer At.new self, subscript when Hash Where.new self, subscript when String, Symbol self[0][subscript] else raise ArgumentError, "Subscript for expression producing a vertex must be an Integer, Hash, String, or Symbol" end end |