module Flowcation
Constants
- DEFAULT_COMMENT
- DEFAULT_GENERATED_TEXT
- VERSION
Public Class Methods
generate(config)
click to toggle source
# File lib/flowcation.rb, line 43 def self.generate(config) Flowcation::Settings.from_config(config['flowcation']) Flowcation::Assets.from_config(config['assets']) Flowcation::Assets.from_config(config['files']) Flowcation::Runtime.register_layouts_from_config(config['layouts']) Flowcation::Runtime.register_templates_from_config(config['templates']) Flowcation::Runtime.register_partial_from_config(config['partials']) end
set_user_object(name:, config:, path:)
click to toggle source
# File lib/flowcation.rb, line 31 def self.set_user_object(name:, config:, path:) if settings = config['flowcation'] file = File.join(path, settings[name]) if File.exist?(file) existing_classes = ObjectSpace.each_object(Class).to_a require file helper_class = (ObjectSpace.each_object(Class).to_a - existing_classes)[0] Flowcation::Settings.set(name + '_object', helper_class.new) end end end