Class: RPath::Attribute
- Inherits:
-
Expression
- Object
- Expression
- RPath::Attribute
- Defined in:
- lib/rpath/expressions.rb
Overview
Given a prior expression producing a vertex V, evaluates to the value of the attribute of V with the given name.
Instance Method Summary collapse
-
#initialize(prior, name) ⇒ Attribute
constructor
A new instance of Attribute.
- #to_s ⇒ String
Methods inherited from Expression
Constructor Details
#initialize(prior, name) ⇒ Attribute
Returns a new instance of Attribute.
291 292 293 294 295 |
# File 'lib/rpath/expressions.rb', line 291 def initialize(prior, name) super() @prior = prior @name = name end |
Instance Method Details
#to_s ⇒ String
298 299 300 |
# File 'lib/rpath/expressions.rb', line 298 def to_s "#{@prior}[#{@name}]" end |