Class: Text::Gen::Filter::Replace

Inherits:
Base
  • Object
show all
Defined in:
lib/text/gen/filter/replace.rb

Instance Method Summary collapse

Methods inherited from Base

#component_key, filter_key, filter_name, #initialize, #key, #to_s, #type, #value

Constructor Details

This class inherits a constructor from Text::Gen::Filter::Base

Instance Method Details

#builder(context, builder) ⇒ Object



7
8
9
10
11
# File 'lib/text/gen/filter/replace.rb', line 7

def builder(context, builder)
  return builder unless builder["key"] == key

  Result.new(text: value, type: "replace")
end