class Puppet::Pops::Loader::LoaderPaths::SmartPath

# DO NOT REMOVE YET. needed later? when there is the need to decamel a classname def de_camel(fq_name)

fq_name.to_s.gsub(/::/, '/').
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
gsub(/([a-z\d])([A-Z])/,'\1_\2').
tr("-", "_").
downcase

end

Attributes

generic_path[R]

Generic path, in the sense of “if there are any entities of this kind to load, where are they?”

Public Class Methods

new(loader) click to toggle source

Creates SmartPath for the given loader (loader knows how to check for existence etc.)

# File lib/puppet/pops/loader/loader_paths.rb, line 40
def initialize(loader)
  @loader = loader
end

Public Instance Methods

effective_path(typed_name, start_index_in_name) click to toggle source

Effective path is the generic path + the name part(s) + extension.

# File lib/puppet/pops/loader/loader_paths.rb, line 53
def effective_path(typed_name, start_index_in_name)
  "#{File.join(generic_path, typed_name.name_parts)}#{extension}"
end
instantiator() click to toggle source
# File lib/puppet/pops/loader/loader_paths.rb, line 61
def instantiator()
  raise NotImplementedError.new
end
relative_path() click to toggle source
# File lib/puppet/pops/loader/loader_paths.rb, line 57
def relative_path()
  raise NotImplementedError.new
end