Method: Elscripto::App#initialize

Defined in:
lib/elscripto/app.rb

#initialize(opts) ⇒ App

Returns a new instance of App.



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/elscripto/app.rb', line 46

def initialize opts
  @opts = opts
  @commands = []
  @command = @opts.command
  @generated_script = ""
  @platform = self.class.get_platform(RbConfig::CONFIG['host_os'])
  first_run?
  @enviroment = @opts.enviroment
  
  if @command == 'start'
    expand_commands!
    add_adhoc_commands!
    raise NoDefinitionsError if @commands.size == 0
  end
end