class Configuration

Configuration holds RubyBBCode configuration

Attributes

ignore_unknown_tags[R]

Defines how to treat unknown tags

  • :exception throws and exception

  • :text converts it into a text

  • :ignore removes it from the output

Public Class Methods

new() click to toggle source
# File lib/ruby-bbcode/configuration.rb, line 9
def initialize
  @ignore_unknown_tags = :text
end

Public Instance Methods

ignore_unknown_tags=(value) click to toggle source
# File lib/ruby-bbcode/configuration.rb, line 13
def ignore_unknown_tags=(value)
  raise 'ignore_unknown_tags must be either :exception, :text or :ignore' unless %i[exception text ignore].include? value

  @ignore_unknown_tags = value
end