Class: Cf::NewBadge

Inherits:
Thor::Group
  • Object
show all
Includes:
Config, Thor::Actions
Defined in:
lib/cf/cli/badge.rb

Overview

:nodoc: all

Instance Method Summary collapse

Methods included from Config

#config_file, #find_home, #get_api_key, #load_config, #save_config, #set_api_key, #set_target_uri

Instance Method Details

#generateObject



10
11
12
13
14
15
# File 'lib/cf/cli/badge.rb', line 10

def generate
  parent_dir = "#{source_destination}/#{name}"
  FileUtils.mkdir(parent_dir)
  template("sample-line/badge.yml.erb", "#{parent_dir}/badge.yml")
  copy_file("sample-line/form.html", "#{parent_dir}/form.html")
end