Class: String

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

Instance Method Summary collapse

Instance Method Details

#blacklistObject



14
15
16
17
18
# File 'lib/dpl/string_ext.rb', line 14

def blacklist
  @is_whitelisted = false

  self
end

#blacklisted?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/dpl/string_ext.rb', line 20

def blacklisted?
  @is_whitelisted.nil? ? false : !@is_whitelisted
end

#whitelistObject



4
5
6
7
8
# File 'lib/dpl/string_ext.rb', line 4

def whitelist
  @is_whitelisted = true

  self
end

#whitelisted?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/dpl/string_ext.rb', line 10

def whitelisted?
  @is_whitelisted
end