Class: GitFindCommitter::Response

Inherits:
Array
  • Object
show all
Defined in:
lib/git_find_committer/response.rb

Instance Method Summary collapse

Instance Method Details

#names(limit = nil) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/git_find_committer/response.rb', line 3

def names(limit=nil)
  result = self.each_with_object([]) do |arr, result|
    result << arr[:name]
  end
  if limit.nil?
    result
  else
    result[0..(limit-1)]
  end
end