class Fenix::Settings

Public Class Methods

new(file = nil) click to toggle source

@since 1.0.0 @api public

# File lib/fenix/core/settings.rb, line 5
def initialize(file = nil)
  @settings = {}
end

Public Instance Methods

[](key) click to toggle source

Returns the provided configuration option

@param [Symbol] key

@example

settings[:compress_assets]
# => true

settings.compress_assets
# => true

@since 1.0.0 @api public

# File lib/fenix/core/settings.rb, line 24
def [](key)
  @settings[key.to_sym]
end
[]=(key, value) click to toggle source

Sets the provided configuration option

@param [Symbol] key @param value

@example

settings[:compress_assets] = true
settings.compress_assets = true

@return [value] @since 1.0.0 @api public

# File lib/fenix/core/settings.rb, line 42
def []=(key, value)
  @settings[key.to_sym] = value
end