03c8e5c2ca
new file: c/CtrlCheckLinks.rb new file: c/Main.rb deleted: c/main.rb new file: fichier/dir/aa modified: m/ReadFile.rb modified: m/ReadFolder.rb modified: v/Vue1.rb deleted: v/VueError.rb new file: v/VueResult.rb
21 lines
338 B
Ruby
21 lines
338 B
Ruby
class ReadFile
|
|
def initialize(pFic)
|
|
@fic = File.open(pFic, "r")
|
|
end
|
|
|
|
def getALL #revoit tout le contenu d'un fichier sous forme d'une chaine de caractere
|
|
all = @fic.read
|
|
return all
|
|
end
|
|
|
|
def getUrls #sort les URLs d'un fichier
|
|
txt = self.getALL
|
|
url = txt.scan(/http[^\s]*/)
|
|
return url
|
|
end
|
|
end
|
|
|
|
|
|
|
|
|