Sha256: 2b93f5087ad3489b61a76da93d4c635fecfb0689a080331b57ad4a7afcdac45d

Contents?: true

Size: 682 Bytes

Versions: 188

Compression:

Stored size: 682 Bytes

Contents

class Puppet::Settings::AliasSetting
  attr_reader :name, :alias_name

  def initialize(args = {})
    @name = args[:name]
    @alias_name = args[:alias_for]
    @alias_for = Puppet.settings.setting(alias_name)
  end

  def optparse_args
    args = @alias_for.optparse_args
    args[0].gsub!(alias_name.to_s, name.to_s)
    args
  end

  def getopt_args
    args = @alias_for.getopt_args
    args[0].gsub!(alias_name.to_s, name.to_s)
    args
  end

  def type
    :alias
  end

  def method_missing(method, *args)
    begin
      alias_for.send(method, *args)
    rescue => e
      Puppet.log_exception(self.class, e.message)
    end
  end

  private

  attr_reader :alias_for
end

Version data entries

188 entries across 188 versions & 1 rubygems

Version Path
puppet-7.34.0 lib/puppet/settings/alias_setting.rb
puppet-7.34.0-x86-mingw32 lib/puppet/settings/alias_setting.rb
puppet-7.34.0-x64-mingw32 lib/puppet/settings/alias_setting.rb
puppet-7.34.0-universal-darwin lib/puppet/settings/alias_setting.rb
puppet-7.33.0 lib/puppet/settings/alias_setting.rb
puppet-7.33.0-x86-mingw32 lib/puppet/settings/alias_setting.rb
puppet-7.33.0-x64-mingw32 lib/puppet/settings/alias_setting.rb
puppet-7.33.0-universal-darwin lib/puppet/settings/alias_setting.rb
puppet-7.32.1 lib/puppet/settings/alias_setting.rb
puppet-7.32.1-x86-mingw32 lib/puppet/settings/alias_setting.rb
puppet-7.32.1-x64-mingw32 lib/puppet/settings/alias_setting.rb
puppet-7.32.1-universal-darwin lib/puppet/settings/alias_setting.rb
puppet-7.31.0 lib/puppet/settings/alias_setting.rb
puppet-7.31.0-x86-mingw32 lib/puppet/settings/alias_setting.rb
puppet-7.31.0-x64-mingw32 lib/puppet/settings/alias_setting.rb
puppet-7.31.0-universal-darwin lib/puppet/settings/alias_setting.rb
puppet-7.30.0 lib/puppet/settings/alias_setting.rb
puppet-7.30.0-x86-mingw32 lib/puppet/settings/alias_setting.rb
puppet-7.30.0-x64-mingw32 lib/puppet/settings/alias_setting.rb
puppet-7.30.0-universal-darwin lib/puppet/settings/alias_setting.rb