class Puppet::Pops::PN::Literal

Attributes

value[R]

Public Class Methods

new(value) click to toggle source
    # File lib/puppet/pops/pn.rb
174 def initialize(value)
175   @value = value
176 end

Public Instance Methods

eql?(o) click to toggle source
    # File lib/puppet/pops/pn.rb
188 def eql?(o)
189   o.is_a?(Literal) && @value == o.value
190 end
format(indent, b) click to toggle source
    # File lib/puppet/pops/pn.rb
178 def format(indent, b)
179   if @value.nil?
180     b << 'nil'
181   elsif value.is_a?(String)
182     double_quote(value, b)
183   else
184     b << value.to_s
185   end
186 end
to_data() click to toggle source
    # File lib/puppet/pops/pn.rb
192 def to_data
193   @value
194 end