Class: Staticpress::Settings

Inherits:
JSObject
  • Object
show all
Defined in:
lib/staticpress/settings.rb

Class Method Summary collapse

Methods inherited from JSObject

#-, #[], #merge, new, #to_hash

Class Method Details

.defaultObject



3
4
5
# File 'lib/staticpress/settings.rb', line 3

def self.default
  new 'verbose' => false
end

.instanceObject



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

def self.instance
  new(default.to_hash.merge(@runtime_settings || {}))
end

.set!(settings) ⇒ Object



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

def self.set!(settings)
  (@runtime_settings ||= {}).merge!(settings)
end