Top Level Namespace

Defined Under Namespace

Modules: Saikuro Classes: EndableParseState, Filter, ParseBlock, ParseClass, ParseComment, ParseCond, ParseDef, ParseDoCond, ParseModule, ParseState, ParseSymbol, TokenCounter

Instance Method Summary collapse

Instance Method Details

#get_ruby_files(path) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
# File 'lib/saikuro.rb', line 31

def get_ruby_files(path)
  files = Array.new
  Find.find(path) do |f|
    if !FileTest.directory?(f)
      if f =~ /rb$/
        files<< f
      end
    end
  end
  files
end

#seperate_file_from_path(path) ⇒ Object

Returns the path without the file



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

def seperate_file_from_path(path)
  res = path.split("/")
  if res.size == 1
    ""
  else
    res[0..res.size - 2].join("/")
  end
end