Class: GmailSignaturePusher::BatchResult
- Inherits:
-
Data
- Object
- Data
- GmailSignaturePusher::BatchResult
- Defined in:
- app/services/gmail_signature_pusher.rb
Overview
Service object: batch result.
Instance Attribute Summary collapse
-
#pushed_at ⇒ Object
readonly
Returns the value of attribute pushed_at.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Instance Method Summary collapse
- #failed ⇒ Object
-
#initialize(results: [], pushed_at: Time.current) ⇒ BatchResult
constructor
A new instance of BatchResult.
- #succeeded ⇒ Object
- #total ⇒ Object
Constructor Details
#initialize(results: [], pushed_at: Time.current) ⇒ BatchResult
Returns a new instance of BatchResult.
17 18 19 |
# File 'app/services/gmail_signature_pusher.rb', line 17 def initialize(results: [], pushed_at: Time.current) super end |
Instance Attribute Details
#pushed_at ⇒ Object (readonly)
Returns the value of attribute pushed_at
16 17 18 |
# File 'app/services/gmail_signature_pusher.rb', line 16 def pushed_at @pushed_at end |
#results ⇒ Object (readonly)
Returns the value of attribute results
16 17 18 |
# File 'app/services/gmail_signature_pusher.rb', line 16 def results @results end |
Instance Method Details
#failed ⇒ Object
22 |
# File 'app/services/gmail_signature_pusher.rb', line 22 def failed = results.reject(&:success) |
#succeeded ⇒ Object
21 |
# File 'app/services/gmail_signature_pusher.rb', line 21 def succeeded = results.select(&:success) |
#total ⇒ Object
23 |
# File 'app/services/gmail_signature_pusher.rb', line 23 def total = results.size |