Class: Mortar::Generators::ControlscriptGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/mortar/generators/controlscript_generator.rb

Instance Method Summary collapse

Methods inherited from Base

#copy_file, #generate_file, #initialize, #inside, #mkdir

Methods included from Helpers

#action, #ask, #confirm, #copy_if_not_present_at_dest, #default_host, #deprecate, #display, #display_header, #display_object, #display_row, #display_table, #display_with_indent, #download_to_file, #ensure_dir_exists, #error, error_with_failure, error_with_failure=, extended, extended_into, #format_bytes, #format_date, #format_with_bang, #full_host, #get_terminal_environment, #home_directory, #host, #hprint, #hputs, included, included_into, #installed_with_omnibus?, #json_decode, #json_encode, #line_formatter, #longest, #output_with_bang, #pending_github_team_state_message, #quantify, #redisplay, #retry_on_exception, #running_on_a_mac?, #running_on_windows?, #set_buffer, #shell, #spinner, #status, #string_distance, #styled_array, #styled_error, #styled_hash, #styled_header, #suggestion, #test_name, #ticking, #time_ago, #truncate, #warning, #with_tty, #write_to_file

Constructor Details

This class inherits a constructor from Mortar::Generators::Base

Instance Method Details

#generate_controlscript(script_name, options) ⇒ Object



22
23
24
25
26
# File 'lib/mortar/generators/controlscript_generator.rb', line 22

def generate_controlscript(script_name, options)
  set_script_binding(script_name, options)

  generate_file "controlscript.py", "controlscripts/#{script_name}.py", :recursive => true
end