Module: Emojinator

Defined in:
lib/emojinator.rb,
lib/emojinator/version.rb,
lib/emojinator/constants.rb

Defined Under Namespace

Modules: Constants

Constant Summary collapse

VERSION =
'0.1.1'

Class Method Summary collapse

Class Method Details

.call(string) ⇒ Object



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

def self.call(string)
  string.gsub(/(#{Constants::SWEAR_WORDS.join('|')})/i) { |_| Constants::EMOJI.sample }
end