Class: Chloe::Tasks::Initialize

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/chloe/tasks/initialize.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



8
9
10
# File 'lib/chloe/tasks/initialize.rb', line 8

def self.source_root
  File.dirname(File.expand_path(File.join(__FILE__, '..')))
end

Instance Method Details

#chmod_executableObject



16
17
18
# File 'lib/chloe/tasks/initialize.rb', line 16

def chmod_executable
  chmod(name, 0755)
end

#create_exampleObject



20
21
22
# File 'lib/chloe/tasks/initialize.rb', line 20

def create_example
  template('templates/example.rb', '.chloe/example.rb')
end

#create_executableObject



12
13
14
# File 'lib/chloe/tasks/initialize.rb', line 12

def create_executable
  template('templates/executable', name)
end