Class: ListingIssues::Sync::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/listing_issues/sync.rb

Overview

Per-provider run tally.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(created: 0, updated: 0, resolved: 0, items: 0) ⇒ Result

Returns a new instance of Result.

Parameters:

  • created (Integer) (defaults to: 0)

    issues created

  • updated (Integer) (defaults to: 0)

    issues updated (re-reported or race-recovered)

  • resolved (Integer) (defaults to: 0)

    open issues auto-resolved

  • items (Integer) (defaults to: 0)

    catalog items reconciled



23
# File 'app/services/listing_issues/sync.rb', line 23

def initialize(created: 0, updated: 0, resolved: 0, items: 0) = super

Instance Attribute Details

#createdObject (readonly)

Returns the value of attribute created

Returns:

  • (Object)

    the current value of created



18
19
20
# File 'app/services/listing_issues/sync.rb', line 18

def created
  @created
end

#itemsObject (readonly)

Returns the value of attribute items

Returns:

  • (Object)

    the current value of items



18
19
20
# File 'app/services/listing_issues/sync.rb', line 18

def items
  @items
end

#resolvedObject (readonly)

Returns the value of attribute resolved

Returns:

  • (Object)

    the current value of resolved



18
19
20
# File 'app/services/listing_issues/sync.rb', line 18

def resolved
  @resolved
end

#updatedObject (readonly)

Returns the value of attribute updated

Returns:

  • (Object)

    the current value of updated



18
19
20
# File 'app/services/listing_issues/sync.rb', line 18

def updated
  @updated
end

Instance Method Details

#to_hHash{Symbol => Integer}

Returns tally as a plain hash.

Returns:

  • (Hash{Symbol => Integer})

    tally as a plain hash



26
# File 'app/services/listing_issues/sync.rb', line 26

def to_h = { created:, updated:, resolved:, items: }