Class: AlwaysBeContributing::Org
- Inherits:
-
Struct
- Object
- Struct
- AlwaysBeContributing::Org
- Defined in:
- lib/always_be_contributing/org.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
4 5 6 |
# File 'lib/always_be_contributing/org.rb', line 4 def name @name end |
Instance Method Details
#member_contribution_count_since(begin_date) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/always_be_contributing/org.rb', line 9 def member_contribution_count_since(begin_date) {}.tap do |contribution_counts| members.each do |m| contribution_counts[m.name] = m.contribution_count_since(begin_date) end end. sort_by {|u| u[1] }. reverse end |
#members ⇒ Object
5 6 7 |
# File 'lib/always_be_contributing/org.rb', line 5 def members member_ids.map {|id| User.new id } end |