Module: StatsHash

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



2
3
4
# File 'lib/gitstats/stats.rb', line 2

def method_missing(method, *args, &block)
  @hash.send(method, *args, &block)
end

Instance Method Details

#each_sortedObject



6
7
8
9
10
# File 'lib/gitstats/stats.rb', line 6

def each_sorted
  @hash.keys.sort.each do |key|
    yield key, @hash[key]
  end
end