Class: SimplelsGem::ListFiles

Inherits:
Object
  • Object
show all
Defined in:
lib/simplels_gem.rb

Class Method Summary collapse

Class Method Details

.ls(path = ".") ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/simplels_gem.rb', line 3

def self.ls(path = ".")
  begin
    Dir.entries(path).each do |i|
      next if i.eql?('.') || i.eql?("..")
      puts i
    end
  rescue Exception => e
    puts "Check your path.. Cheers"
  end
end

.manpageObject



14
15
16
17
# File 'lib/simplels_gem.rb', line 14

def self.manpage
  path = File.dirname(__FILE__) 
  system(" man #{path}/simple-ls-manpage" )
end