Class: KCommercial::Component

Inherits:
Object
  • Object
show all
Defined in:
lib/KCommercialPipeline/core/resource/component_resources_config.rb

Constant Summary collapse

CONFIGURATION_ROOT =
'Configurations'.freeze
RESOURCES_CONFIGURATION_ROOT =
'Resources'.freeze

Instance Method Summary collapse

Instance Method Details

#colors_keysKeyDefines

Get the colors key defines

Returns:

  • (KeyDefines)


48
49
50
# File 'lib/KCommercialPipeline/core/resource/component_resources_config.rb', line 48

def colors_keys
  @colors_keys ||= key_defines_for_name('colors')
end

#configurations_rootObject



9
10
11
# File 'lib/KCommercialPipeline/core/resource/component_resources_config.rb', line 9

def configurations_root
  path.join CONFIGURATION_ROOT
end

#files_keysKeyDefines

Get the resources key defines

Returns:

  • (KeyDefines)


36
37
38
# File 'lib/KCommercialPipeline/core/resource/component_resources_config.rb', line 36

def files_keys
  @files_keys ||= key_defines_for_name('files')
end

#fonts_keysKeyDefines

Get the fonts key defines

Returns:

  • (KeyDefines)


42
43
44
# File 'lib/KCommercialPipeline/core/resource/component_resources_config.rb', line 42

def fonts_keys
  @fonts_keys ||= key_defines_for_name('fonts')
end

#i18ns_keysKeyDefines

Get the i18ns key defines

Returns:

  • (KeyDefines)


24
25
26
# File 'lib/KCommercialPipeline/core/resource/component_resources_config.rb', line 24

def i18ns_keys
  @i18n_keys ||= key_defines_for_name('i18ns')
end

#images_keysKeyDefines

Get the images key defines

Returns:

  • (KeyDefines)


30
31
32
# File 'lib/KCommercialPipeline/core/resource/component_resources_config.rb', line 30

def images_keys
  @images_keys ||= key_defines_for_name('images')
end

#resources_configuration_rootPathname

Get the root for the resources configurations. it may be contains i18n or images keys

Returns:



15
16
17
18
19
20
# File 'lib/KCommercialPipeline/core/resource/component_resources_config.rb', line 15

def resources_configuration_root
  path = configurations_root.join 'resources'
  return path if path.exist?

  configurations_root.join CONFIGURATION_ROOT
end