Module: Flowcation
- Defined in:
- lib/flowcation.rb,
lib/flowcation/block.rb,
lib/flowcation/assets.rb,
lib/flowcation/layout.rb,
lib/flowcation/render.rb,
lib/flowcation/partial.rb,
lib/flowcation/runtime.rb,
lib/flowcation/version.rb,
lib/flowcation/registry.rb,
lib/flowcation/settings.rb,
lib/flowcation/template.rb,
lib/flowcation/callbacks.rb,
lib/flowcation/processor.rb,
lib/flowcation/file_writer.rb,
lib/flowcation/substitution.rb,
lib/flowcation/layout_helper.rb,
lib/flowcation/substitutions.rb,
lib/flowcation/overwrite_exception.rb,
lib/flowcation/block_not_found_exception.rb,
lib/flowcation/substitution_not_found_exception.rb,
lib/generators/flowcation/generate/config_generator.rb
Defined Under Namespace
Modules: Callbacks, FileWriter, Generate, Registry, Render, Substitutions
Classes: Assets, Block, BlockNotFoundException, Layout, LayoutHelper, OverwriteException, Partial, Processor, Runtime, Settings, Substitution, SubstitutionNotFoundException, Template
Constant Summary
collapse
- DEFAULT_GENERATED_TEXT =
"GENERATED_BY_FLOWCATION"
"<!-- ::comment:: -->"
- VERSION =
"0.3.0"
Class Method Summary
collapse
Class Method Details
.generate(config) ⇒ Object
.set_user_object(name:, config:, path:) ⇒ Object
31
32
33
34
35
36
37
38
39
40
41
|
# 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
|