Class: RemoveEmoji::Sanitize
- Inherits:
-
Object
- Object
- RemoveEmoji::Sanitize
- Defined in:
- lib/remove_emoji.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(original_string) ⇒ Sanitize
constructor
A new instance of Sanitize.
- #sanitize ⇒ Object
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
#sanitize ⇒ Object
15 16 17 |
# File 'lib/remove_emoji.rb', line 15 def sanitize @original_string.gsub(RemoveEmoji::MATCH_EMOJI_CODEPOINTS_RULE, '') end |