Class: Vim::Flavor::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/vim-flavor/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.common_options_to_deployObject



6
7
8
9
10
# File 'lib/vim-flavor/cli.rb', line 6

def self.common_options_to_deploy
  method_option :vimfiles_path,
    :desc => 'Where to install Vim plugins.',
    :banner => 'DIR'
end

.exit_on_failure?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/vim-flavor/cli.rb', line 45

def self.exit_on_failure?
  true
end

Instance Method Details

#installObject



14
15
16
17
18
# File 'lib/vim-flavor/cli.rb', line 14

def install
  Facade.new().install(
    options[:vimfiles_path] || default_vimfiles_path
  )
end

#test(*files_or_dirs) ⇒ Object



30
31
32
# File 'lib/vim-flavor/cli.rb', line 30

def test(*files_or_dirs)
  Facade.new().test(files_or_dirs)
end

#upgradeObject



22
23
24
25
26
# File 'lib/vim-flavor/cli.rb', line 22

def upgrade
  Facade.new().upgrade(
    options[:vimfiles_path] || default_vimfiles_path
  )
end

#versionObject



35
36
37
# File 'lib/vim-flavor/cli.rb', line 35

def version
  puts VERSION
end