Class: Bolt::PAL::YamlPlan::EvaluableString
- Inherits:
-
Object
- Object
- Bolt::PAL::YamlPlan::EvaluableString
- Defined in:
- lib/bolt/pal/yaml_plan.rb
Overview
This class wraps a value parsed from YAML which may be Puppet code. That includes double-quoted strings and string literals, each of which subclasses this parent class in order to implement its own evaluation logic.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(value, file = nil, line = nil) ⇒ EvaluableString
constructor
A new instance of EvaluableString.
Constructor Details
#initialize(value, file = nil, line = nil) ⇒ EvaluableString
Returns a new instance of EvaluableString.
110 111 112 113 114 |
# File 'lib/bolt/pal/yaml_plan.rb', line 110 def initialize(value, file = nil, line = nil) @value = value @file = file @line = line end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
108 109 110 |
# File 'lib/bolt/pal/yaml_plan.rb', line 108 def file @file end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
108 109 110 |
# File 'lib/bolt/pal/yaml_plan.rb', line 108 def line @line end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
108 109 110 |
# File 'lib/bolt/pal/yaml_plan.rb', line 108 def value @value end |
Instance Method Details
#==(other) ⇒ Object
116 117 118 |
# File 'lib/bolt/pal/yaml_plan.rb', line 116 def ==(other) self.class == other.class && @value == other.value end |