Class: Ghit::Stats::CodeFrequency
- Inherits:
-
Object
- Object
- Ghit::Stats::CodeFrequency
- Defined in:
- lib/ghit/stats/code_frequency.rb
Class Method Summary collapse
Instance Method Summary collapse
- #get ⇒ Object
-
#initialize ⇒ CodeFrequency
constructor
A new instance of CodeFrequency.
Constructor Details
#initialize ⇒ CodeFrequency
Returns a new instance of CodeFrequency.
11 12 13 14 |
# File 'lib/ghit/stats/code_frequency.rb', line 11 def initialize @globals = Ghit::Globals.new @stats = Github::Client::Repos::Statistics.new end |
Class Method Details
.get! ⇒ Object
6 7 8 |
# File 'lib/ghit/stats/code_frequency.rb', line 6 def get! new.get end |
Instance Method Details
#get ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/ghit/stats/code_frequency.rb', line 16 def get code_frequency = fetch_freq_data print_output_heading code_frequency.each do |date, additions, deletions| date = unixtime_to_date date format_and_print_freq_data date, additions, deletions end print_fourty_one_dashes end |