Class: Railspress::ContentImportService::Result

Inherits:
Struct
  • Object
show all
Defined in:
app/services/railspress/content_import_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#createdObject

Returns the value of attribute created

Returns:

  • (Object)

    the current value of created



9
10
11
# File 'app/services/railspress/content_import_service.rb', line 9

def created
  @created
end

#errorsObject

Returns the value of attribute errors

Returns:

  • (Object)

    the current value of errors



9
10
11
# File 'app/services/railspress/content_import_service.rb', line 9

def errors
  @errors
end

#restoredObject

Returns the value of attribute restored

Returns:

  • (Object)

    the current value of restored



9
10
11
# File 'app/services/railspress/content_import_service.rb', line 9

def restored
  @restored
end

#updatedObject

Returns the value of attribute updated

Returns:

  • (Object)

    the current value of updated



9
10
11
# File 'app/services/railspress/content_import_service.rb', line 9

def updated
  @updated
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'app/services/railspress/content_import_service.rb', line 14

def success?
  errors.empty?
end

#total_processedObject



10
11
12
# File 'app/services/railspress/content_import_service.rb', line 10

def total_processed
  created + updated + restored
end