Class: Reading::Config

Inherits:
Object show all
Defined in:
lib/reading/config.rb

Overview

Builds a hash config.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(custom_config = {}) ⇒ Config

Returns a new instance of Config.

Parameters:

  • custom_config (Hash) (defaults to: {})

    a custom config which overrides the defaults, e.g. { errors: { styling: :html } }



11
12
13
14
15
# File 'lib/reading/config.rb', line 11

def initialize(custom_config = {})
  @custom_config = custom_config

  build_hash
end

Instance Attribute Details

#hashObject (readonly)

Returns the value of attribute hash.



7
8
9
# File 'lib/reading/config.rb', line 7

def hash
  @hash
end