Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/dm-is-taggable/tag_list.rb
Overview
Backporting the ends_with? method from Rails’ ActiveSupport
Instance Method Summary collapse
Instance Method Details
#ends_with?(suffix) ⇒ Boolean
3 4 5 6 |
# File 'lib/dm-is-taggable/tag_list.rb', line 3 def ends_with?(suffix) suffix = suffix.to_s self[-suffix.length, suffix.length] == suffix end |