Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/rhosync/console/app/helpers/extensions.rb

Instance Method Summary collapse

Instance Method Details

#ends_with?(str) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
17
18
# File 'lib/rhosync/console/app/helpers/extensions.rb', line 14

def ends_with?(str)
  str = str.to_str
  tail = self[-str.length, str.length]
  tail == str      
end