Class: Poper::CLI

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.is_thor_reserved_word?(word, type) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
12
# File 'lib/poper/cli.rb', line 9

def is_thor_reserved_word?(word, type)
  return false if word == 'run'
  super
end

Instance Method Details

#run(commit) ⇒ Object



17
18
19
20
21
22
23
24
# File 'lib/poper/cli.rb', line 17

def run(commit)
  Runner.new(commit).run.each do |message|
    # message.commit and message.message are Strings
    # prints first 7 characteres of the commit sha1 hash
    # followed by the associated message
    puts "#{message.commit[0..6]}: #{message.message}"
  end
end

#versionObject



29
30
31
# File 'lib/poper/cli.rb', line 29

def version
  puts "Poper version #{::Poper::VERSION}"
end