class Autoterm::CLI
Attributes
args[R]
Public Class Methods
new(args)
click to toggle source
# File lib/autoterm/cli.rb, line 7 def initialize(args) @args = args end
run(args)
click to toggle source
# File lib/autoterm/cli.rb, line 3 def self.run(args) new(args).run end
Public Instance Methods
run()
click to toggle source
# File lib/autoterm/cli.rb, line 11 def run if project_name.to_s.length.zero? error! "Provide a project name" end OSAScript.new( TmuxinatorProject.from_yaml_file(project_name) ).run rescue Error => error error! error end
Private Instance Methods
error!(message)
click to toggle source
# File lib/autoterm/cli.rb, line 31 def error!(message) $stderr.puts message Kernel.exit 1 end
project_name()
click to toggle source
# File lib/autoterm/cli.rb, line 27 def project_name @project_name ||= args[0] end