Class: Bashly::Commands::Add
- Defined in:
- lib/bashly/commands/add.rb
Instance Method Summary collapse
- #colors_command ⇒ Object
- #comp_command ⇒ Object
- #config_command ⇒ Object
- #lib_command ⇒ Object
- #strings_command ⇒ Object
- #yaml_command ⇒ Object
Methods included from AssetHelper
Instance Method Details
#colors_command ⇒ Object
44 45 46 |
# File 'lib/bashly/commands/add.rb', line 44 def colors_command safe_copy_lib "colors.sh" end |
#comp_command ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/bashly/commands/add.rb', line 52 def comp_command format = args['FORMAT'] output = args['OUTPUT'] case format when "function" save_comp_function output when "yaml" save_comp_yaml output when "script" save_comp_script output else raise Error, "Unrecognized format: #{format}" end end |
#config_command ⇒ Object
40 41 42 |
# File 'lib/bashly/commands/add.rb', line 40 def config_command safe_copy_lib "config.sh" end |
#lib_command ⇒ Object
36 37 38 |
# File 'lib/bashly/commands/add.rb', line 36 def lib_command safe_copy_lib "sample_function.sh" end |
#strings_command ⇒ Object
32 33 34 |
# File 'lib/bashly/commands/add.rb', line 32 def strings_command safe_copy asset("templates/strings.yml"), "#{Settings.source_dir}/bashly-strings.yml" end |
#yaml_command ⇒ Object
48 49 50 |
# File 'lib/bashly/commands/add.rb', line 48 def yaml_command safe_copy_lib "yaml.sh" end |