Class: String

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

Instance Method Summary collapse

Instance Method Details

#to_pathnameObject



14
15
16
# File 'lib/datapimp/core_ext.rb', line 14

def to_pathname
  Pathname(self)
end

#with_leading_slashObject



22
23
24
# File 'lib/datapimp/core_ext.rb', line 22

def with_leading_slash
  "/#{without_leading_slash}"
end

#without_leading_slashObject



18
19
20
# File 'lib/datapimp/core_ext.rb', line 18

def without_leading_slash
  gsub(/^\//,'')
end