class RPath::VertexExpression
An expression that evaluates to a vertex V @abstract
Public Instance Methods
[](subscript)
click to toggle source
Returns an expression that evaluates to the value of an attribute of V @return [Attribute] @raise [ArgumentError]
+subscript+ is not a String or Symbol
# 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
adjacent()
click to toggle source
Returns an expression that evaluates to V’s adjacent vertices. @return [Adjacent]
# File lib/rpath/expressions.rb, line 54 def adjacent Adjacent.new self end
content()
click to toggle source
Returns an expression that evaluates to V’s content. @return [Content]
# File lib/rpath/expressions.rb, line 60 def content Content.new self end
method_missing(name, *args, &block)
click to toggle source
Returns an expression that evaluates to V’s adjacent vertices named name
. Enables the basic RPath
expression +RPath { foo }+. @return [Named]
# File lib/rpath/expressions.rb, line 78 def method_missing(name, *args, &block) Named.new adjacent, name.to_s end