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



96
97
98
# File 'lib/vivlio_starter/cli/resize.rb', line 96

def converted
  @converted
end

#skippedObject (readonly)

Returns the value of attribute skipped

Returns:

  • (Object)

    the current value of skipped



96
97
98
# File 'lib/vivlio_starter/cli/resize.rb', line 96

def skipped
  @skipped
end

Instance Method Details

#+(other) ⇒ Object



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

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

#none?Boolean

Returns:

  • (Boolean)


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

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