Class: Puppet::Cleaner::Variable

Inherits:
Part
  • Object
show all
Defined in:
lib/puppet-cleaner/parts.rb

Constant Summary

Constants inherited from Part

Part::DQESCAPE, Part::DQPATTERN, Part::DQSPECIAL, Part::SPECIAL_ESCAPE_SEQUENCES, Part::SQESCAPE, Part::SQPATTERN

Instance Method Summary collapse

Methods inherited from Part

create, #dqescape, #has_special_escape_sequences?, #initialize, #name, #name=, #sqescape, #value, #value=

Constructor Details

This class inherits a constructor from Puppet::Cleaner::Part

Instance Method Details

#show(context) ⇒ Object



83
84
85
86
87
88
89
# File 'lib/puppet-cleaner/parts.rb', line 83

def show(context)
  if [:DQPRE, :DQMID].include?(context[:before].name)
    print value
  else
    super
  end
end

#to_sObject



79
80
81
# File 'lib/puppet-cleaner/parts.rb', line 79

def to_s
  "$#{value}"
end