Class: Decidim::DirectVerifications::Stats
- Inherits:
-
Object
- Object
- Decidim::DirectVerifications::Stats
- Defined in:
- app/mailers/decidim/direct_verifications/stats.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#successful ⇒ Object
readonly
Returns the value of attribute successful.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(count:, successful:, errors:) ⇒ Stats
constructor
A new instance of Stats.
Constructor Details
#initialize(count:, successful:, errors:) ⇒ Stats
Returns a new instance of Stats.
16 17 18 19 20 |
# File 'app/mailers/decidim/direct_verifications/stats.rb', line 16 def initialize(count:, successful:, errors:) @count = count @successful = successful @errors = errors end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
6 7 8 |
# File 'app/mailers/decidim/direct_verifications/stats.rb', line 6 def count @count end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
6 7 8 |
# File 'app/mailers/decidim/direct_verifications/stats.rb', line 6 def errors @errors end |
#successful ⇒ Object (readonly)
Returns the value of attribute successful.
6 7 8 |
# File 'app/mailers/decidim/direct_verifications/stats.rb', line 6 def successful @successful end |
Class Method Details
.from(instrumenter, type) ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/mailers/decidim/direct_verifications/stats.rb', line 8 def self.from(instrumenter, type) new( count: instrumenter.emails_count(type), successful: instrumenter.processed_count(type), errors: instrumenter.errors_count(type) ) end |