Class: VueCK::BatchRenderer
- Inherits:
-
Object
- Object
- VueCK::BatchRenderer
- Defined in:
- lib/batchrenderer.rb
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ BatchRenderer
constructor
A new instance of BatchRenderer.
- #render ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ BatchRenderer
Returns a new instance of BatchRenderer.
3 4 5 |
# File 'lib/batchrenderer.rb', line 3 def initialize(opts={}) @path = opts[:path] || DIRS[:components] end |
Instance Method Details
#render ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/batchrenderer.rb', line 7 def render out = {components:"",style:""} file_iterator do |file| component = SFC.new file out[:components] += component.render_component out[:style] += component.render_style end out end |