Sha256: 211bbd0dda369303149fcfe615ef536e769081ddf53c47a35fd9b9940476656d

Contents?: true

Size: 601 Bytes

Versions: 2

Compression:

Stored size: 601 Bytes

Contents

require 'obscenity/error'
require 'obscenity/config'
require 'obscenity/base'
require 'obscenity/version'

if defined?(::RSpec)
  require 'obscenity/rspec_matcher'
end

module Obscenity extend self

  attr_accessor :config

  def configure(&block)
    @config = Config.new(&block)
  end

  def config
    @config ||= Config.new
  end

  def profane?(word)
    Obscenity::Base.profane?(word)
  end

  def sanitize(text)
    Obscenity::Base.sanitize(text)
  end

  def replacement(chars)
    Obscenity::Base.replacement(chars)
  end

  def offensive(text)
    Obscenity::Base.offensive(text)
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
obscenity2-0.0.2 lib/obscenity.rb
obscenity2-0.0.1 lib/obscenity.rb