Method: Consular::CLI#edit

Defined in:
lib/consular/cli.rb

#edit(project = nil) ⇒ Object



112
113
114
115
116
117
# File 'lib/consular/cli.rb', line 112

def edit(project = nil)
  type = project && project =~ /\.yml$/ ? 'yml' : 'term'
  path = termfile_path project
  template "templates/example.#{type}.tt", path, :skip => true
  open_in_editor path, options[:editor]
end