Module: Jenerator::Generators

Defined in:
lib/jenerator.rb,
lib/jenerator/generators/component.rb

Defined Under Namespace

Classes: Component

Constant Summary collapse

DEV_PATH =

Path To Source Folder

File.expand_path("../../", File.dirname(__FILE__))

Class Method Summary collapse

Class Method Details

.add_generator(name, klass) ⇒ Object



19
20
21
# File 'lib/jenerator.rb', line 19

def add_generator(name, klass)
  mappings[name] = klass
end

.load_components!Object



23
24
25
# File 'lib/jenerator.rb', line 23

def load_components!
  load_paths.flatten.each { |file| require file  }
end

.load_pathsObject



11
12
13
# File 'lib/jenerator.rb', line 11

def load_paths
  @_files ||= []
end

.mappingsObject



15
16
17
# File 'lib/jenerator.rb', line 15

def mappings
  @_mappings ||= ActiveSupport::OrderedHash.new
end