Sha256: 7d2ca658538dd27d2804d38461787ea8bfac3ca5e845fa73889a1f5a9697387d
Contents?: true
Size: 894 Bytes
Versions: 3
Compression:
Stored size: 894 Bytes
Contents
require 'volt/server/html_parser/view_parser' require 'volt/server/component_templates' require 'volt/server/rack/asset_files' # Takes in the name and all component paths and has a .code # method that returns all of the ruby setup code for the component. module Volt class ComponentCode def initialize(component_name, component_paths, client = true) @component_name = component_name @component_paths = component_paths @client = client end # The client argument is for if this code is being generated for the client def code(client=true) code = '' asset_files = AssetFiles.new(@component_name, @component_paths) asset_files.component_paths.each do |component_path, component_name| code << ComponentTemplates.new(component_path, component_name, client).code code << "\n\n" end code end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
volt-0.8.21 | lib/volt/server/rack/component_code.rb |
volt-0.8.20 | lib/volt/server/rack/component_code.rb |
volt-0.8.19 | lib/volt/server/rack/component_code.rb |