Class: Blammo::CLI

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/blammo/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



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

def self.source_root
  File.dirname(__FILE__)
end

Instance Method Details

#generate(path = "changelog.yml") ⇒ Object



14
15
16
17
18
19
# File 'lib/blammo/cli.rb', line 14

def generate(path = "changelog.yml")
  path      = File.expand_path(path, destination_root)
  changelog = Changelog.new(path)
  changelog.refresh(destination_root, options[:name])
  create_file(path, changelog.to_yaml)
end

#render(path = "changelog.yml") ⇒ Object



24
25
26
27
28
# File 'lib/blammo/cli.rb', line 24

def render(path = "changelog.yml")
  @changelog = Changelog.new(path)
  source     = "../../templates/changelog.html.erb"
  template(source, "changelog.html")
end