Class: GitLog::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/gitlog/cli.rb

Instance Method Summary collapse

Instance Method Details

#allObject



25
26
27
28
29
30
31
# File 'lib/gitlog/cli.rb', line 25

def all
	grouping = :type_wise
    if options[:scopewise]
    	grouping = :scope_wise
    end
    puts GitLog::Log.generate_log(options[:date], grouping, options[:author], options[:current_branch])
end

#myObject



11
12
13
14
15
16
17
# File 'lib/gitlog/cli.rb', line 11

def my
	grouping = :type_wise
    if options[:scopewise]
    	grouping = :scope_wise
    end
    puts GitLog::Log.generate_log(options[:date], grouping, nil, options[:current_branch])
end

#rangeObject



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/gitlog/cli.rb', line 39

def range
	from = options[:from]
	if from.nil?
      from = ask('From Commit:')
    end
    to = options[:to]
    if to.nil?
      to = ask('To Commit:')
    end

    grouping = :type_wise
    if options[:scopewise]
    	grouping = :scope_wise
    end
	puts GitLog::Log.log_between_commits(to, from, grouping, options[:author])
end