Class: Marketing::Ads::ActionItemSync::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/marketing/ads/action_item_sync.rb

Overview

One run's tally.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(created: 0, updated: 0, staled: 0, campaigns: 0) ⇒ Result

Returns a new instance of Result.

Parameters:

  • created (Integer) (defaults to: 0)

    items opened this run

  • updated (Integer) (defaults to: 0)

    items whose evidence was refreshed

  • staled (Integer) (defaults to: 0)

    items retired because their rule went quiet

  • campaigns (Integer) (defaults to: 0)

    campaigns the rules were measured against



76
# File 'app/services/marketing/ads/action_item_sync.rb', line 76

def initialize(created: 0, updated: 0, staled: 0, campaigns: 0) = super

Instance Attribute Details

#campaignsObject (readonly)

Returns the value of attribute campaigns

Returns:

  • (Object)

    the current value of campaigns



71
72
73
# File 'app/services/marketing/ads/action_item_sync.rb', line 71

def campaigns
  @campaigns
end

#createdObject (readonly)

Returns the value of attribute created

Returns:

  • (Object)

    the current value of created



71
72
73
# File 'app/services/marketing/ads/action_item_sync.rb', line 71

def created
  @created
end

#staledObject (readonly)

Returns the value of attribute staled

Returns:

  • (Object)

    the current value of staled



71
72
73
# File 'app/services/marketing/ads/action_item_sync.rb', line 71

def staled
  @staled
end

#updatedObject (readonly)

Returns the value of attribute updated

Returns:

  • (Object)

    the current value of updated



71
72
73
# File 'app/services/marketing/ads/action_item_sync.rb', line 71

def updated
  @updated
end

Instance Method Details

#to_hHash

Returns the tally, for the log line.

Returns:

  • (Hash)

    the tally, for the log line



79
# File 'app/services/marketing/ads/action_item_sync.rb', line 79

def to_h = { created:, updated:, staled:, campaigns: }