Class: Flowcation::Settings

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

Class Method Summary collapse

Class Method Details

.from_config(options = {}) ⇒ Object



15
16
17
18
19
# File 'lib/flowcation/settings.rb', line 15

def self.from_config(options={})
  options&.each do |k,v|
    instance.register_setting k,v
  end
end

.get(k) ⇒ Object



7
8
9
# File 'lib/flowcation/settings.rb', line 7

def self.get(k)
  instance.settings[k]
end

.set(k, v) ⇒ Object



11
12
13
# File 'lib/flowcation/settings.rb', line 11

def self.set(k, v)
  instance.settings[k] = v
end