Class: Cf::Newline

Inherits:
Thor::Group
  • Object
show all
Includes:
Config, Thor::Actions
Defined in:
lib/cf/cli/line.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

#generate_line_templateObject



12
13
14
15
16
17
18
19
20
# File 'lib/cf/cli/line.rb', line 12

def generate_line_template
  arr = yaml_destination.split("/")
  arr.pop
  line_destination = arr.join("/")
  template("sample-line/line.yml.erb", yaml_destination)
  copy_file("sample-line/form.html", "#{line_destination}/station1.html")
  copy_file("sample-line/sample-line.csv", "#{line_destination}/input/#{title.underscore.dasherize}.csv")
  FileUtils.mkdir("#{line_destination}/output")
end