Class: FalkorLib::CLI::Link

Inherits:
Thor
  • Object
show all
Includes:
FalkorLib::Common
Defined in:
lib/falkorlib/cli/link.rb

Overview

Thor class for symlink creation

Instance Method Summary collapse

Methods included from FalkorLib::Common

ask, bold, command?, cyan, error, exec_or_exit, execute, execute_in_dir, green, info, init_from_template, init_rvm, list_items, load_config, nice_execute, normalized_path, not_implemented, really_continue?, red, run, select_from, select_multiple_from, show_diff_and_write, store_config, warning, write_from_erb_template, write_from_template

Instance Method Details

#commandsObject



20
21
22
# File 'lib/falkorlib/cli/link.rb', line 20

def commands
  puts Link.all_commands.keys.sort - [ 'commands' ]
end

#make(dir = Dir.pwd) ⇒ Object



54
55
56
57
# File 'lib/falkorlib/cli/link.rb', line 54

def make(dir = Dir.pwd)
  (help(__method__) and exit 0) if options[:help]
  FalkorLib::Bootstrap::Link.makefile(dir, options)
end

#rootdir(dir = Dir.pwd) ⇒ Object



28
29
30
31
32
33
# File 'lib/falkorlib/cli/link.rb', line 28

def rootdir(dir = Dir.pwd)
  # TODO: find a generic way to handle help in subcommands
  # -- see https://github.com/erikhuda/thor/issues/532
  (help(__method__) and exit 0) if options[:help]
  FalkorLib::Bootstrap::Link.root(dir, options)
end