Method: Licensed::AppConfiguration#initialize

Defined in:
lib/licensed/configuration.rb

#initialize(options = {}, inherited_options = {}) ⇒ AppConfiguration

Returns a new instance of AppConfiguration.



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/licensed/configuration.rb', line 21

def initialize(options = {}, inherited_options = {})
  super()

  # update order:
  # 1. anything inherited from root config
  # 2. explicitly configured app settings
  update(inherited_options)
  update(options)
  verify_arg "source_path"

  self["sources"] ||= {}
  self["reviewed"] ||= {}
  self["ignored"] ||= {}
  self["allowed"] ||= []
  self["root"] = AppConfiguration.root_for(self)
  self["name"] = generate_app_name
  # setting the cache path might need a valid app name.
  # this must come after setting self["name"]
  self["cache_path"] = detect_cache_path(options, inherited_options)
end