module Stax::Generators
Public Class Methods
find(name)
click to toggle source
find subclass that matches command name
# File lib/stax/generators.rb, line 18 def self.find(name) Base.subclasses.find do |g| g.command_name == name end end
load_builtin_generators()
click to toggle source
# File lib/stax/generators.rb, line 6 def self.load_builtin_generators Dir[File.join(__dir__, 'generators', '**', '*_generator.rb')].map(&method(:require)) end
load_local_generators()
click to toggle source
load any generators in project lib/generators/
# File lib/stax/generators.rb, line 11 def self.load_local_generators if Stax.root_path Dir[Stax.root_path.join('lib', 'generators', '**', '*_generator.rb')].map(&method(:require)) end end