Class: GmailSignaturePusher::BatchResult

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(results: [], pushed_at: Time.current) ⇒ BatchResult

Returns a new instance of BatchResult.



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

def initialize(results: [], pushed_at: Time.current)
  super
end

Instance Attribute Details

#pushed_atObject (readonly)

Returns the value of attribute pushed_at

Returns:

  • (Object)

    the current value of pushed_at



13
14
15
# File 'app/services/gmail_signature_pusher.rb', line 13

def pushed_at
  @pushed_at
end

#resultsObject (readonly)

Returns the value of attribute results

Returns:

  • (Object)

    the current value of results



13
14
15
# File 'app/services/gmail_signature_pusher.rb', line 13

def results
  @results
end

Instance Method Details

#failedObject



19
# File 'app/services/gmail_signature_pusher.rb', line 19

def failed    = results.reject(&:success)

#succeededObject



18
# File 'app/services/gmail_signature_pusher.rb', line 18

def succeeded = results.select(&:success)

#totalObject



20
# File 'app/services/gmail_signature_pusher.rb', line 20

def total     = results.size