Class: SetRepository

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

Overview

Command ‘lookfile init’ implementation

Class Method Summary collapse

Methods inherited from Command

childrens, childrens?, run_childrens, usage, usage_header

Class Method Details

.command_nameObject



15
16
17
# File 'lib/commands/set_repository.rb', line 15

def self.command_name
  'setrepo'
end

.options_messagesObject



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

def self.options_messages
  %(  setrepo \t $ lookfile setrepo [repository_ssh]
\t\t - Set lookfile repository to save files
\t\t - repository_ssh: link ssh to  repository
  )
end

.parentObject



19
20
21
# File 'lib/commands/set_repository.rb', line 19

def self.parent
  Look
end

.run(argv) ⇒ Object



23
24
25
26
27
# File 'lib/commands/set_repository.rb', line 23

def self.run(argv)
  repository_ssh_name = argv.first
  Lookfile.set_repository(repository_ssh_name)
  puts "Setted repository to: #{repository_ssh_name}"
end