Class: Md2site::Make
- Inherits:
-
Object
- Object
- Md2site::Make
- Defined in:
- lib/md2site/make.rb
Overview
makeサブコマンドクラス
Instance Method Summary collapse
-
#do_multiple_commands(target_command) ⇒ void
指定ターゲットコマンドに属する全サブターゲットコマンドを順次実行する.
-
#execute_subcommand(target_command, subtarget_command) ⇒ void
引数optionでの指定に従いサブコマンドを実行.
-
#initialize(env, mes, verbose, str_variable, str_static, obj_by_yaml) ⇒ Make
constructor
初期化.
Constructor Details
#initialize(env, mes, verbose, str_variable, str_static, obj_by_yaml) ⇒ Make
初期化
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/md2site/make.rb', line 15 def initialize(env, mes, verbose, str_variable, str_static, obj_by_yaml) @env = env @mes = mes @verbose = verbose @str_variable = str_variable @str_static = str_static @obj_by_yaml = obj_by_yaml @template_dir = @env.conf_hs["TEMPLELATE_DIR"] @default_table_template = @env.conf_hs["DEFAULT_TABLE_TEMPLATE"] # 5col_no_attr_b.erb end |
Instance Method Details
#do_multiple_commands(target_command) ⇒ void
This method returns an undefined value.
指定ターゲットコマンドに属する全サブターゲットコマンドを順次実行する
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/md2site/make.rb', line 45 def do_multiple_commands(target_command) subtarget_command_names = @env.get_subtarget_commands(target_command) if !subtarget_command_names.empty? subtarget_command_names.map do |subtarget_command| @mes.output_info("#{target_command} #{subtarget_command}") do_single_command(target_command, subtarget_command) end else @mes.output_fatal("Illeagel targetcommand(#{target_command}") exit(@mes.ec("EXIT_CODE_ILLEAGAL_TARGETCOMMAND")) end end |
#execute_subcommand(target_command, subtarget_command) ⇒ void
This method returns an undefined value.
引数optionでの指定に従いサブコマンドを実行
32 33 34 35 36 37 38 |
# File 'lib/md2site/make.rb', line 32 def execute_subcommand(target_command, subtarget_command) if subtarget_command == SUB_TARGET_COMMAND_OF_ALL do_multiple_commands(target_command) else do_single_command(target_command, subtarget_command) end end |