Class: Flowcation::Runtime

Inherits:
Object
  • Object
show all
Includes:
FileWriter, Registry, Singleton
Defined in:
lib/flowcation/runtime.rb

Class Method Summary collapse

Methods included from FileWriter

#add_generated_comment, #check_if_generated_by_flowcation!, #generated?, #generated_comment, #within_comment, #write_files

Class Method Details

.register_layouts_from_config(config = {}) ⇒ Object



10
11
12
13
14
# File 'lib/flowcation/runtime.rb', line 10

def self.register_layouts_from_config(config={})
  config&.each do |name, options|
    instance.register_layout Layout.from_config(options)
  end
end

.register_partial_from_config(config = {}) ⇒ Object



22
23
24
25
26
# File 'lib/flowcation/runtime.rb', line 22

def self.register_partial_from_config(config={})
  config&.each do |name, options|
    instance.register_partial Partial.from_config(options)
  end
end

.register_templates_from_config(config = {}) ⇒ Object



16
17
18
19
20
# File 'lib/flowcation/runtime.rb', line 16

def self.register_templates_from_config(config={})
  config&.each do |name, options|
    instance.register_template Template.from_config(options)
  end
end