Class: VivlioStarter::CLI::ResizeCommands::ResizeSummary

Inherits:
Data
  • Object
show all
Defined in:
lib/vivlio_starter/cli/resize.rb

Overview

変換実績。表示は呼び出し側の責務とし、ドメイン層は件数を返すだけにする。 vs build の Step 1 も同じ関数を対象ディレクトリごとに呼ぶため、ここで結果報告を 出すとビルド中に「対象画像が見つかりませんでした」等が何行も混ざってしまう。

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#convertedObject (readonly)

Returns the value of attribute converted

Returns:

  • (Object)

    the current value of converted



49
50
51
# File 'lib/vivlio_starter/cli/resize.rb', line 49

def converted
  @converted
end

#skippedObject (readonly)

Returns the value of attribute skipped

Returns:

  • (Object)

    the current value of skipped



49
50
51
# File 'lib/vivlio_starter/cli/resize.rb', line 49

def skipped
  @skipped
end

Instance Method Details

#+(other) ⇒ Object



50
# File 'lib/vivlio_starter/cli/resize.rb', line 50

def +(other) = ResizeSummary.new(converted: converted + other.converted, skipped: skipped + other.skipped)

#none?Boolean

Returns:

  • (Boolean)


51
# File 'lib/vivlio_starter/cli/resize.rb', line 51

def none? = converted.zero? && skipped.zero?