Class: SplttyCLI::Commands::TemplateScope
- Inherits:
-
Object
- Object
- SplttyCLI::Commands::TemplateScope
- Defined in:
- lib/spltty_cli/commands/install.rb
Overview
Plain binding holder for ERB — each key becomes a local-ish reader method,
so templates read <%= participants %> rather than <%= vars[:participants] %>.
Instance Method Summary collapse
- #binding_for ⇒ Object
-
#initialize(vars) ⇒ TemplateScope
constructor
A new instance of TemplateScope.
Constructor Details
#initialize(vars) ⇒ TemplateScope
Returns a new instance of TemplateScope.
398 399 400 |
# File 'lib/spltty_cli/commands/install.rb', line 398 def initialize(vars) vars.each { |k, v| define_singleton_method(k) { v } } end |
Instance Method Details
#binding_for ⇒ Object
402 403 404 |
# File 'lib/spltty_cli/commands/install.rb', line 402 def binding_for binding end |