Class: Md2site::Info

Inherits:
Object
  • Object
show all
Defined in:
lib/md2site/info.rb

Overview

infoサブコマンドクラス

Instance Method Summary collapse

Constructor Details

#initialize(env, mes) ⇒ Info

初期化

Parameters:

  • env (Env)

    Envクラスのインスタンス

  • mes (Messagex)

    Messagexクラスのインスタンス



10
11
12
13
# File 'lib/md2site/info.rb', line 10

def initialize(env, mes)
  @env = env
  @mes = mes
end

Instance Method Details

#execute_subcommand(option) ⇒ void

This method returns an undefined value.

サブコマンド実行

Parameters:

  • option (Struct)

    オプションストラクト



20
21
22
23
24
25
26
27
# File 'lib/md2site/info.rb', line 20

def execute_subcommand(option)
  case option.name
  when "zlist"
    @env.make_zlist.map {|x| @mes.output_fatal(x) }
  when "zindex"
    @env.make_zindex_html
  end
end