Class: CustomerRelations::ContactStateCounts
- Inherits:
-
Object
- Object
- CustomerRelations::ContactStateCounts
- Includes:
- Gitlab::Utils::StrongMemoize
- Defined in:
- app/models/customer_relations/contact_state_counts.rb
Instance Attribute Summary collapse
-
#group ⇒ Object
readonly
Returns the value of attribute group.
Class Method Summary collapse
Instance Method Summary collapse
- #all ⇒ Object
-
#initialize(current_user, group, params) ⇒ ContactStateCounts
constructor
A new instance of ContactStateCounts.
Constructor Details
#initialize(current_user, group, params) ⇒ ContactStateCounts
Returns a new instance of ContactStateCounts.
13 14 15 16 17 |
# File 'app/models/customer_relations/contact_state_counts.rb', line 13 def initialize(current_user, group, params) @current_user = current_user @group = group @params = params end |
Instance Attribute Details
#group ⇒ Object (readonly)
Returns the value of attribute group.
7 8 9 |
# File 'app/models/customer_relations/contact_state_counts.rb', line 7 def group @group end |
Class Method Details
.declarative_policy_class ⇒ Object
9 10 11 |
# File 'app/models/customer_relations/contact_state_counts.rb', line 9 def self.declarative_policy_class 'CustomerRelations::ContactPolicy' end |
Instance Method Details
#all ⇒ Object
24 25 26 |
# File 'app/models/customer_relations/contact_state_counts.rb', line 24 def all counts.values.sum end |