class Verto::MainCommand
Public Instance Methods
init()
click to toggle source
# File lib/verto/commands/main_command.rb, line 11 def init path = options[:path] || Verto.config.project.path validate_current_vertofile!(path) Template.render('Vertofile', to: path) end
version()
click to toggle source
# File lib/verto/commands/main_command.rb, line 21 def version Verto.stdout.puts Verto::VERSION end
Private Instance Methods
validate_current_vertofile!(path)
click to toggle source
# File lib/verto/commands/main_command.rb, line 27 def validate_current_vertofile!(path) return unless Pathname.new(path).join('Vertofile').exist? command_error!( <<~ERROR Project already have a Vertofile. If you want to generate a new with verto init, delete the current one with: `rm Vertofile` ERROR ) end