Class: Ansible::Ruby::Models::JinjaExpression
- Inherits:
-
Object
- Object
- Ansible::Ruby::Models::JinjaExpression
- Defined in:
- lib/ansible/ruby/models/jinja_expression.rb
Instance Attribute Summary collapse
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
Instance Method Summary collapse
- #===(other_node) ⇒ Object
-
#initialize(expression) ⇒ JinjaExpression
constructor
A new instance of JinjaExpression.
- #to_s ⇒ Object
- #to_str ⇒ Object
Constructor Details
#initialize(expression) ⇒ JinjaExpression
Returns a new instance of JinjaExpression.
9 10 11 |
# File 'lib/ansible/ruby/models/jinja_expression.rb', line 9 def initialize(expression) @expression = expression end |
Instance Attribute Details
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
7 8 9 |
# File 'lib/ansible/ruby/models/jinja_expression.rb', line 7 def expression @expression end |
Instance Method Details
#===(other_node) ⇒ Object
21 22 23 |
# File 'lib/ansible/ruby/models/jinja_expression.rb', line 21 def ===(other_node) other_node.is_a?(JinjaExpression) && expression == other_node.expression end |
#to_s ⇒ Object
13 14 15 |
# File 'lib/ansible/ruby/models/jinja_expression.rb', line 13 def to_s "{{ #{@expression} }}" end |
#to_str ⇒ Object
17 18 19 |
# File 'lib/ansible/ruby/models/jinja_expression.rb', line 17 def to_str to_s end |