Class: Bunto::ThemeBuilder::ERBRenderer
- Inherits:
-
Object
- Object
- Bunto::ThemeBuilder::ERBRenderer
- Extended by:
- Forwardable
- Defined in:
- lib/bunto/theme_builder.rb
Instance Method Summary collapse
- #bunto_version_with_minor ⇒ Object
-
#initialize(theme_builder) ⇒ ERBRenderer
constructor
A new instance of ERBRenderer.
- #render(contents) ⇒ Object
- #theme_directories ⇒ Object
Constructor Details
#initialize(theme_builder) ⇒ ERBRenderer
Returns a new instance of ERBRenderer.
101 102 103 |
# File 'lib/bunto/theme_builder.rb', line 101 def initialize(theme_builder) @theme_builder = theme_builder end |
Instance Method Details
#bunto_version_with_minor ⇒ Object
105 106 107 |
# File 'lib/bunto/theme_builder.rb', line 105 def bunto_version_with_minor Bunto::VERSION.split(".").take(2).join(".") end |
#render(contents) ⇒ Object
113 114 115 |
# File 'lib/bunto/theme_builder.rb', line 113 def render(contents) ERB.new(contents).result binding end |
#theme_directories ⇒ Object
109 110 111 |
# File 'lib/bunto/theme_builder.rb', line 109 def theme_directories SCAFFOLD_DIRECTORIES end |