Class: RERB::Templater
- Inherits:
-
Object
- Object
- RERB::Templater
- Defined in:
- lib/rerb/templater.rb
Direct Known Subclasses
Constant Summary collapse
- TEMPLATE =
"<%= content %>"
Instance Method Summary collapse
- #generate(input) ⇒ Object
-
#initialize(filename, root_name) ⇒ Templater
constructor
A new instance of Templater.
Constructor Details
#initialize(filename, root_name) ⇒ Templater
Returns a new instance of Templater.
12 13 14 15 |
# File 'lib/rerb/templater.rb', line 12 def initialize(filename, root_name) @viewmodel_name = File.basename(filename, ".*").split("_").map(&:capitalize).join @root_name = root_name end |