Class: Report::ItemMovedToScrap::ItemMovedToScrapReport::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/report/item_moved_to_scrap/item_moved_to_scrap_report.rb

Overview

Service object: result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(success: nil, data: []) ⇒ Result

Initialize a new instance.

Parameters:

  • success (Object, nil) (defaults to: nil)
  • data (Array) (defaults to: [])


9
10
11
# File 'app/services/report/item_moved_to_scrap/item_moved_to_scrap_report.rb', line 9

def initialize(success: nil, data: []) = super
# Whether the command validated and ran successfully.
# @return [Boolean]

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



5
6
7
# File 'app/services/report/item_moved_to_scrap/item_moved_to_scrap_report.rb', line 5

def data
  @data
end

#successObject (readonly)

Returns the value of attribute success

Returns:

  • (Object)

    the current value of success



5
6
7
# File 'app/services/report/item_moved_to_scrap/item_moved_to_scrap_report.rb', line 5

def success
  @success
end

Instance Method Details

#success?Boolean

Whether the command validated and ran successfully.

Returns:

  • (Boolean)


12
# File 'app/services/report/item_moved_to_scrap/item_moved_to_scrap_report.rb', line 12

def success? = success