Class: GmailSignaturePusher::BatchResult
- Inherits:
-
Data
- Object
- Data
- GmailSignaturePusher::BatchResult
- Defined in:
- app/services/gmail_signature_pusher.rb
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.
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_at ⇒ Object (readonly)
Returns the value of attribute pushed_at
13 14 15 |
# File 'app/services/gmail_signature_pusher.rb', line 13 def pushed_at @pushed_at end |
#results ⇒ Object (readonly)
Returns the value of attribute results
13 14 15 |
# File 'app/services/gmail_signature_pusher.rb', line 13 def results @results end |
Instance Method Details
#failed ⇒ Object
19 |
# File 'app/services/gmail_signature_pusher.rb', line 19 def failed = results.reject(&:success) |
#succeeded ⇒ Object
18 |
# File 'app/services/gmail_signature_pusher.rb', line 18 def succeeded = results.select(&:success) |
#total ⇒ Object
20 |
# File 'app/services/gmail_signature_pusher.rb', line 20 def total = results.size |