class ConfigmonkeyCli::Application::ManifestAction::Rtfm

Public Instance Methods

destructive() click to toggle source
# File lib/configmonkey_cli/application/manifest_actions/rtfm.rb, line 26
def destructive
  thor.create_link(@link, manifest.directory)
end
init(directory, opts = {}) click to toggle source
# File lib/configmonkey_cli/application/manifest_actions/rtfm.rb, line 5
def init directory, opts = {}
  @directory = directory
  @opts = opts.reverse_merge({
    name: "__THIS_IS_A_GIT_BASED_CONFIG__",
    symbolic: true,
  })
end
prepare() click to toggle source
# File lib/configmonkey_cli/application/manifest_actions/rtfm.rb, line 13
def prepare
  @actual_directory = expand_dst(@directory)
  @link = File.join(@actual_directory, @opts[:name])
end
simulate() click to toggle source
# File lib/configmonkey_cli/application/manifest_actions/rtfm.rb, line 18
def simulate
  if thor.options[:pretend]
    destructive
  else
    status :fake, :black, rel(@link)
  end
end