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(settings, scope: Renderers::Namespace.new(settings.project_namespaced_class), client: ::ERB) ⇒ ERB
constructor
A new instance of ERB.
Constructor Details
#initialize(settings, scope: Renderers::Namespace.new(settings.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 settings, scope: Renderers::Namespace.new(settings.project_namespaced_class), client: ::ERB @settings = settings @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) |