def initialize(options)
if !options['match_expression']
raise ArgumentError.new('missing required match_expression')
end
if !options['replacement'] && !options['ignore']
raise ArgumentError.new('must specify replacement when ignore is false')
end
@match_expression = Regexp.new(options['match_expression'], Regexp::IGNORECASE)
@replacement = options['replacement']
@ignore = options['ignore'] || false
@eval_order = options['eval_order'] || 0
@replace_all = options['replace_all'] || false
@each_segment = options['each_segment'] || false
@terminate_chain = options['terminate_chain'] || false
end