Method: String#ends_with?

Defined in:
lib/m_string.rb

#ends_with?(x) ⇒ Boolean

Returns:

  • (Boolean)


116
117
118
# File 'lib/m_string.rb', line 116

def ends_with?(x)
  self.match(/#{x}$/) ? true : false
end