Class: Gitegnore::CLI

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

Instance Method Summary collapse

Instance Method Details

#fetch(name) ⇒ Object



23
24
25
26
# File 'lib/gitegnore/cli.rb', line 23

def fetch(name)
  puts Dir.pwd
  Gitegnore.fetch(name)
end

#listObject



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/gitegnore/cli.rb', line 8

def list
  ignorefile_list = Gitegnore.list
  ignorefile_list.each_with_index do |name, index|
    if index == 0
      print "all supported gitignore files:\n\n"
    end
    print name.gsub(".gitignore", "").ljust(30)

    if((index + 1) % 5) == 0
      puts
    end
  end
end