Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/bark/utils/string_helpers.rb

Instance Method Summary collapse

Instance Method Details

#last_characterObject



2
3
4
# File 'lib/bark/utils/string_helpers.rb', line 2

def last_character
  self[-1]
end

#with_trailing_slashObject



6
7
8
9
# File 'lib/bark/utils/string_helpers.rb', line 6

def with_trailing_slash
  return self + '/' if last_character != '/'
  self
end