Class: Hyrax::Statistics::Depositors::Summary
- Inherits:
-
Object
- Object
- Hyrax::Statistics::Depositors::Summary
- Includes:
- Blacklight::SearchHelper
- Defined in:
- app/services/hyrax/statistics/depositors/summary.rb
Instance Attribute Summary collapse
-
#end_dt ⇒ Object
Returns the value of attribute end_dt.
-
#start_dt ⇒ Object
Returns the value of attribute start_dt.
Instance Method Summary collapse
- #depositors ⇒ Object
-
#initialize(start_date, end_date) ⇒ Summary
constructor
A new instance of Summary.
Constructor Details
#initialize(start_date, end_date) ⇒ Summary
Returns a new instance of Summary.
10 11 12 13 |
# File 'app/services/hyrax/statistics/depositors/summary.rb', line 10 def initialize(start_date, end_date) @start_dt = start_date @end_dt = end_date end |
Instance Attribute Details
#end_dt ⇒ Object
Returns the value of attribute end_dt.
15 16 17 |
# File 'app/services/hyrax/statistics/depositors/summary.rb', line 15 def end_dt @end_dt end |
#start_dt ⇒ Object
Returns the value of attribute start_dt.
15 16 17 |
# File 'app/services/hyrax/statistics/depositors/summary.rb', line 15 def start_dt @start_dt end |
Instance Method Details
#depositors ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'app/services/hyrax/statistics/depositors/summary.rb', line 17 def depositors # step through the array by twos to get each pair results.map do |key, deposits| user = ::User.find_by_user_key(key) raise "Unable to find user '#{key}'\nResults was: #{results.inspect}" unless user { key: key, deposits: deposits, user: user } end end |