Module: Puppet::Pops::Types::PStructType::ClassModule

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

Instance Method Summary collapse

Instance Method Details

#==(o) ⇒ Object



318
319
320
# File 'lib/puppet/pops/types/types.rb', line 318

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

#clear_hashed_elementsObject



310
311
312
# File 'lib/puppet/pops/types/types.rb', line 310

def clear_hashed_elements
  @_hashed = nil
end

#hashObject



314
315
316
# File 'lib/puppet/pops/types/types.rb', line 314

def hash
  [self.class, Set.new(elements)].hash
end

#hashed_elements_derivedObject



305
306
307
308
# File 'lib/puppet/pops/types/types.rb', line 305

def hashed_elements_derived
  @_hashed ||= elements.reduce({}) {|memo, e| memo[e.name] = e.type; memo }
  @_hashed
end