Class: Turple::Cli

Inherits:
Thor
  • Object
show all
Defined in:
lib/turple/cli.rb

Instance Method Summary collapse

Instance Method Details

#ateObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/turple/cli.rb', line 8

def ate
  destination = File.expand_path options['destination']

  # load destination turplefile if it exists
  Turple.load_turplefile File.join(destination, 'Turplefile')

  # update turpleobject object with cli options
  Turple.turpleobject = {
    template: (options['template'] || Turple.template rescue nil),
    configuration: {
      destination: destination,
      cli: true
    }
  }

  # initialize turple
  Turple.ate Turple.template, Turple.data, Turple.configuration
end