Module: Puppet::Pops::Types::PRegexpType::ClassModule

Defined in:
lib/puppet/pops/types/types.rb

Instance Method Summary collapse

Instance Method Details

#==(o) ⇒ Object



186
187
188
# File 'lib/puppet/pops/types/types.rb', line 186

def ==(o)
  self.class == o.class && pattern == o.pattern
end

#hashObject



182
183
184
# File 'lib/puppet/pops/types/types.rb', line 182

def hash
  [self.class, pattern].hash
end

#regexp_derivedObject



176
177
178
179
180
# File 'lib/puppet/pops/types/types.rb', line 176

def regexp_derived
  pattern_or_blank = pattern || ''
  @_regexp = Regexp.new(pattern_or_blank) unless @_regexp && @_regexp.source == pattern_or_blank
  @_regexp
end