Module: Elixir::Path

Defined in:
lib/elixir/path.rb

Class Method Summary collapse

Class Method Details

.absname(path) ⇒ Object



5
6
7
# File 'lib/elixir/path.rb', line 5

def absname path
  ::File.expand_path path
end

.basename(path) ⇒ Object



9
10
11
12
13
# File 'lib/elixir/path.rb', line 9

def basename path
  base = ::File.basename path

  base == '/' ? '' : base
end

.dirname(path) ⇒ Object



15
16
17
# File 'lib/elixir/path.rb', line 15

def dirname path
  ::File.dirname path
end

.expand(path) ⇒ Object



19
20
21
# File 'lib/elixir/path.rb', line 19

def expand path
  ::File.expand_path path
end

.extname(path) ⇒ Object



23
24
25
# File 'lib/elixir/path.rb', line 23

def extname path
  ::File.extname path
end