Class: Whatsnew::CLI

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

Instance Method Summary collapse

Instance Method Details

#about(path_or_repo = nil) ⇒ Object



14
15
16
17
18
19
20
21
22
23
# File 'lib/whatsnew/cli.rb', line 14

def about(path_or_repo = nil)
  news = Whatsnew.about path_or_repo, options[:access_token]

  if news.is_a? Whatsnew::NoNewsFile
    say_in_green "Not found. This project should keep a changelog."
    say_in_green "Please see http://keepachangelog.com."
  else
    say_in_green news.read
  end
end

#versionObject



7
8
9
# File 'lib/whatsnew/cli.rb', line 7

def version
  say Whatsnew::VERSION
end