Class: ChangelogGenerator::CLI
- Inherits:
-
Thor
- Object
- Thor
- ChangelogGenerator::CLI
- Defined in:
- lib/changelog_generator/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
6 7 8 |
# File 'lib/changelog_generator/cli.rb', line 6 def self.exit_on_failure? true end |
Instance Method Details
#generate ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/changelog_generator/cli.rb', line 31 def generate() generator = Generator.new([:user], [:repo], [:from_ref], [:to_ref], [:label_filter]) begin output = generator.description + "\n\n" output << generator.changelog puts output rescue Exception => e puts e. STDERR.puts "#{e}" STDERR.puts e.backtrace throw e end end |
#hello(name) ⇒ Object
15 16 17 18 19 |
# File 'lib/changelog_generator/cli.rb', line 15 def hello(name) greeting = "Hello, #{name}!" greeting.upcase! if [:upcase] puts greeting end |