class VueCK::BatchRenderer
Public Class Methods
new(opts={})
click to toggle source
# File lib/batchrenderer.rb, line 3 def initialize(opts={}) @path = opts[:path] || DIRS[:components] end
Public Instance Methods
render()
click to toggle source
# 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
Private Instance Methods
file_iterator() { |item| ... }
click to toggle source
# File lib/batchrenderer.rb, line 19 def file_iterator(&block) Dir.glob("#{@path}*.vue") do |item| next if item == '.' or item == '..' yield item end end