Class: FluentPath::Expression
- Inherits:
-
Object
- Object
- FluentPath::Expression
- Defined in:
- lib/fluentpath/expression.rb
Instance Attribute Summary collapse
-
#tree ⇒ Object
Returns the value of attribute tree.
Instance Method Summary collapse
- #clone ⇒ Object
-
#initialize(tree) ⇒ Expression
constructor
A new instance of Expression.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(tree) ⇒ Expression
Returns a new instance of Expression.
6 7 8 |
# File 'lib/fluentpath/expression.rb', line 6 def initialize(tree) @tree = tree end |
Instance Attribute Details
#tree ⇒ Object
Returns the value of attribute tree.
4 5 6 |
# File 'lib/fluentpath/expression.rb', line 4 def tree @tree end |
Instance Method Details
#clone ⇒ Object
18 19 20 21 |
# File 'lib/fluentpath/expression.rb', line 18 def clone clone_tree = @tree.map{|x|x.clone rescue x} FluentPath::Expression.new(clone_tree) end |
#inspect ⇒ Object
14 15 16 |
# File 'lib/fluentpath/expression.rb', line 14 def inspect to_s end |
#to_s ⇒ Object
10 11 12 |
# File 'lib/fluentpath/expression.rb', line 10 def to_s "#{@tree}" end |