Class: Init

Inherits:
Command show all
Defined in:
lib/commands/init.rb

Overview

Command ‘lookfile init’ implementation

Class Method Summary collapse

Methods inherited from Command

childrens, childrens?, run_childrens, usage, usage_bottom, usage_header

Class Method Details

.command_nameObject



14
15
16
# File 'lib/commands/init.rb', line 14

def self.command_name
  'init'
end

.options_messagesObject



8
9
10
11
12
# File 'lib/commands/init.rb', line 8

def self.options_messages
  %(  init \t\t $ lookfile init
\t\t - Initialize lookfile configurations
  )
end

.parentObject



18
19
20
# File 'lib/commands/init.rb', line 18

def self.parent
  Look
end

.runObject



22
23
24
25
26
27
28
29
# File 'lib/commands/init.rb', line 22

def self.run(*)
  dir = Lookfile.initialize
  if dir
    puts "Initialize lookfile on: #{dir}"
  else
    puts 'lookfile was already initialized'
  end
end