Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/string.rb

Overview

Extend String with extnames utils

Instance Method Summary collapse

Instance Method Details

#ico?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/string.rb', line 11

def ico?
  ['.ico'].include? File.extname self
end

#png?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/string.rb', line 7

def png?
  ['.png'].include? File.extname self
end

#svg?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/string.rb', line 3

def svg?
  ['.svg'].include? File.extname self
end