Class: VivlioStarter::CLI::DeleteCommands::DeleteSummary

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

Overview

削除実績。表示は呼び出し側(DeleteCommand)の責務とし、ここでは件数を返すだけにする

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#documentsObject (readonly)

Returns the value of attribute documents

Returns:

  • (Object)

    the current value of documents



35
36
37
# File 'lib/vivlio_starter/cli/delete.rb', line 35

def documents
  @documents
end

#image_dirsObject (readonly)

Returns the value of attribute image_dirs

Returns:

  • (Object)

    the current value of image_dirs



35
36
37
# File 'lib/vivlio_starter/cli/delete.rb', line 35

def image_dirs
  @image_dirs
end

Class Method Details

.noneObject



36
# File 'lib/vivlio_starter/cli/delete.rb', line 36

def self.none = new(documents: 0, image_dirs: 0)

Instance Method Details

#+(other) ⇒ Object



37
38
# File 'lib/vivlio_starter/cli/delete.rb', line 37

def +(other) = DeleteSummary.new(documents: documents + other.documents,
image_dirs: image_dirs + other.image_dirs)

#none?Boolean

Returns:

  • (Boolean)


39
# File 'lib/vivlio_starter/cli/delete.rb', line 39

def none? = documents.zero? && image_dirs.zero?