Class: String

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

Instance Method Summary collapse

Instance Method Details

#path_to_module_nameObject



15
16
17
# File 'lib/guard/haskell.rb', line 15

def path_to_module_name
  self.gsub(/\//, ".")
end

#strip_lowercase_directoriesObject



6
7
8
9
10
11
12
13
# File 'lib/guard/haskell.rb', line 6

def strip_lowercase_directories
  matches = self.match(/^\p{Lower}[^\/]+\/(.+)/)
  if matches
    matches[1].strip_lowercase_directories
  else
    self
  end
end