Class: Decidim::DirectVerifications::UserStats
- Inherits:
-
Object
- Object
- Decidim::DirectVerifications::UserStats
- Defined in:
- lib/decidim/direct_verifications/user_stats.rb
Instance Attribute Summary collapse
-
#authorization_handler ⇒ Object
Returns the value of attribute authorization_handler.
-
#emails ⇒ Object
Returns the value of attribute emails.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
Instance Method Summary collapse
- #authorized ⇒ Object
- #authorized_unconfirmed ⇒ Object
-
#initialize(organization) ⇒ UserStats
constructor
A new instance of UserStats.
- #registered ⇒ Object
- #unconfirmed ⇒ Object
Constructor Details
#initialize(organization) ⇒ UserStats
Returns a new instance of UserStats.
6 7 8 9 10 |
# File 'lib/decidim/direct_verifications/user_stats.rb', line 6 def initialize(organization) @organization = organization @authorization_handler = "" @emails = [] end |
Instance Attribute Details
#authorization_handler ⇒ Object
Returns the value of attribute authorization_handler.
12 13 14 |
# File 'lib/decidim/direct_verifications/user_stats.rb', line 12 def @authorization_handler end |
#emails ⇒ Object
Returns the value of attribute emails.
13 14 15 |
# File 'lib/decidim/direct_verifications/user_stats.rb', line 13 def emails @emails end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
12 13 14 |
# File 'lib/decidim/direct_verifications/user_stats.rb', line 12 def organization @organization end |
Instance Method Details
#authorized ⇒ Object
28 29 30 |
# File 'lib/decidim/direct_verifications/user_stats.rb', line 28 def .count end |
#authorized_unconfirmed ⇒ Object
32 33 34 |
# File 'lib/decidim/direct_verifications/user_stats.rb', line 32 def .where(decidim_users: { confirmed_at: nil }).count end |
#registered ⇒ Object
20 21 22 |
# File 'lib/decidim/direct_verifications/user_stats.rb', line 20 def registered registered_users.count end |
#unconfirmed ⇒ Object
24 25 26 |
# File 'lib/decidim/direct_verifications/user_stats.rb', line 24 def unconfirmed registered_users.where(decidim_users: { confirmed_at: nil }).count end |