Class: Hanami::Assets::AppConfig Private

Inherits:
Object
  • Object
show all
Includes:
Dry::Configurable
Defined in:
lib/hanami/assets/app_config.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

App config for assets.

This is NOT RELEASED as of 2.0.0.

Since:

  • 0.1.0

Instance Method Summary collapse

Constructor Details

#initializeAppConfig

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of AppConfig.

Since:

  • 0.1.0



21
22
23
24
25
# File 'lib/hanami/assets/app_config.rb', line 21

def initialize(*)
  super

  @base_config = Assets::Config.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object (private)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0



46
47
48
49
50
51
52
53
54
# File 'lib/hanami/assets/app_config.rb', line 46

def method_missing(name, *args, &block)
  if config.respond_to?(name)
    config.public_send(name, *args, &block)
  elsif base_config.respond_to?(name)
    base_config.public_send(name, *args, &block)
  else
    super
  end
end

Instance Method Details

#finalize!Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0



32
33
# File 'lib/hanami/assets/app_config.rb', line 32

def finalize!
end

#initialize_copy(source) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0



27
28
29
30
# File 'lib/hanami/assets/app_config.rb', line 27

def initialize_copy(source)
  super
  @base_config = source.base_config.dup
end

#settingsSet

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the list of available settings

Returns:

  • (Set)

Since:

  • 0.1.0



40
41
42
# File 'lib/hanami/assets/app_config.rb', line 40

def settings
  base_config.settings + self.class.settings
end