Class: RemoveEmoji::Sanitize

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(original_string) ⇒ Sanitize

Returns a new instance of Sanitize.



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

def initialize(original_string)
  @original_string = original_string
end

Class Method Details

.call(*args) ⇒ Object



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

def self.call(*args)
  new(*args).sanitize
end

Instance Method Details

#sanitizeObject



15
16
17
# File 'lib/remove_emoji.rb', line 15

def sanitize
  @original_string.gsub(RemoveEmoji::MATCH_EMOJI_CODEPOINTS_RULE, '')
end