Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/bark/utils/string_helpers.rb
Instance Method Summary collapse
Instance Method Details
#last_character ⇒ Object
2 3 4 |
# File 'lib/bark/utils/string_helpers.rb', line 2 def last_character self[-1] end |
#with_trailing_slash ⇒ Object
6 7 8 9 |
# File 'lib/bark/utils/string_helpers.rb', line 6 def with_trailing_slash return self + '/' if last_character != '/' self end |