Class: Bashly::Commands::Add

Inherits:
Base
  • Object
show all
Defined in:
lib/bashly/commands/add.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#config, #config_validator, #validate_config, #with_valid_config

Methods included from AssetHelper

#asset, #asset_content

Instance Attribute Details

#skip_src_checkObject (readonly)

Returns the value of attribute skip_src_check.



21
22
23
# File 'lib/bashly/commands/add.rb', line 21

def skip_src_check
  @skip_src_check
end

Instance Method Details

#runObject



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/bashly/commands/add.rb', line 23

def run
  say "Performing git operations, this may take a while...\n" if lib_source.git?

  if args['--list']
    show_list
  else
    add_lib args['LIBRARY']
  end

  lib_source.cleanup if lib_source.git?
end