Class: Rubysmith::Renderers::ERB
- Inherits:
-
Object
- Object
- Rubysmith::Renderers::ERB
- Defined in:
- lib/rubysmith/renderers/erb.rb
Overview
Renders ERB templates as fully functional files.
Instance Method Summary collapse
- #call(content) ⇒ Object
-
#initialize(configuration, scope: Renderers::Namespace.new(configuration.project_namespaced_class), client: ::ERB) ⇒ ERB
constructor
A new instance of ERB.
Constructor Details
#initialize(configuration, scope: Renderers::Namespace.new(configuration.project_namespaced_class), client: ::ERB) ⇒ ERB
Returns a new instance of ERB.
9 10 11 12 13 14 15 |
# File 'lib/rubysmith/renderers/erb.rb', line 9 def initialize configuration, scope: Renderers::Namespace.new(configuration.project_namespaced_class), client: ::ERB @configuration = configuration @scope = scope @client = client end |
Instance Method Details
#call(content) ⇒ Object
17 |
# File 'lib/rubysmith/renderers/erb.rb', line 17 def call(content) = client.new(content, trim_mode: "<>", eoutvar: "@buffer").result(binding) |