Method: String#ends_with?
- Defined in:
- lib/strokedb/core_ext/string.rb
#ends_with?(suffix) ⇒ Boolean
4 5 6 7 |
# File 'lib/strokedb/core_ext/string.rb', line 4 def ends_with?(suffix) suffix = suffix.to_s self[-suffix.length, suffix.length] == suffix end |