Class: Organizations::OrganizationAssociationCounter
- Inherits:
-
Object
- Object
- Organizations::OrganizationAssociationCounter
- Includes:
- ActionView::Helpers::NumberHelper, NumbersHelper
- Defined in:
- app/finders/organizations/organization_association_counter.rb
Constant Summary collapse
- COUNTER_LIMIT =
1000
Constants included from NumbersHelper
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(organization:, current_user:) ⇒ OrganizationAssociationCounter
constructor
A new instance of OrganizationAssociationCounter.
Methods included from NumbersHelper
#limited_counter_with_delimiter, #number_in_words
Constructor Details
#initialize(organization:, current_user:) ⇒ OrganizationAssociationCounter
Returns a new instance of OrganizationAssociationCounter.
12 13 14 15 |
# File 'app/finders/organizations/organization_association_counter.rb', line 12 def initialize(organization:, current_user:) @organization = organization @current_user = current_user end |
Instance Method Details
#execute ⇒ Object
17 18 19 20 21 |
# File 'app/finders/organizations/organization_association_counter.rb', line 17 def execute return {} if organization.nil? || ! association_counts end |