Class: Catalog::ValidateCatalogItems::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/catalog/validate_catalog_items.rb

Overview

Service object: result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(catalog_item_validated: nil, invalid_catalog_items: [], messages: []) ⇒ Result

Returns a new instance of Result.



6
# File 'app/services/catalog/validate_catalog_items.rb', line 6

def initialize(catalog_item_validated: nil, invalid_catalog_items: [], messages: []) = super

Instance Attribute Details

#catalog_item_validatedObject (readonly)

Returns the value of attribute catalog_item_validated

Returns:

  • (Object)

    the current value of catalog_item_validated



5
6
7
# File 'app/services/catalog/validate_catalog_items.rb', line 5

def catalog_item_validated
  @catalog_item_validated
end

#invalid_catalog_itemsObject (readonly)

Returns the value of attribute invalid_catalog_items

Returns:

  • (Object)

    the current value of invalid_catalog_items



5
6
7
# File 'app/services/catalog/validate_catalog_items.rb', line 5

def invalid_catalog_items
  @invalid_catalog_items
end

#messagesObject (readonly)

Returns the value of attribute messages

Returns:

  • (Object)

    the current value of messages



5
6
7
# File 'app/services/catalog/validate_catalog_items.rb', line 5

def messages
  @messages
end

Instance Method Details

#catalog_item_validated?Boolean

Returns:

  • (Boolean)


7
# File 'app/services/catalog/validate_catalog_items.rb', line 7

def catalog_item_validated? = catalog_item_validated