Class: Kamaze::Project::Autoload

Inherits:
Hash
  • Object
show all
Defined in:
lib/kamaze/project/autoload.rb

Overview

Autoload class

Instance Method Summary collapse

Constructor Details

#initializeAutoload

rubocop:disable Metrics/MethodLength



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/kamaze/project/autoload.rb', line 11

def initialize # rubocop:disable Metrics/MethodLength
  # @formatter:off
  {
    VERSION: 'version',
    Bundled: 'bundled',
    Concern: 'concern',
    Config: 'config',
    Debug: 'debug',
    DSL: 'dsl',
    Helper: 'helper',
    Inflector: 'inflector',
    Observable: 'observable',
    Observer: 'observer',
    Struct: 'struct',
    Tools: 'tools',
    ToolsProvider: 'tools_provider',
  }.each { |k, v| self[k] = v }
  # @formatter:on
end

Instance Method Details

#call(path) ⇒ Object



31
32
33
34
35
36
37
# File 'lib/kamaze/project/autoload.rb', line 31

def call(path)
  self.tap do
    self.each do |s, fp|
      Kamaze::Project.__send__(:autoload, s, "#{path}/#{fp}")
    end
  end
end