Class: Emque::Consuming::Generators::Application
- Inherits:
-
Object
- Object
- Emque::Consuming::Generators::Application
- Defined in:
- lib/emque/consuming/generators/application.rb
Constant Summary collapse
- IGNORE =
[".", ".."]
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(options, name) ⇒ Application
constructor
A new instance of Application.
Constructor Details
#initialize(options, name) ⇒ Application
Returns a new instance of Application.
11 12 13 14 |
# File 'lib/emque/consuming/generators/application.rb', line 11 def initialize(, name) self.name = Inflecto.underscore(name) self. = end |
Instance Method Details
#generate ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/emque/consuming/generators/application.rb', line 16 def generate context = Class.new(Object) { |obj| def initialize(, name) @name = Inflecto.camelize(name) @options = end def get_binding; binding; end }.new(, name).get_binding @current_dir = File.realdirpath(Dir.pwd) recursively_copy_templates( File.realdirpath( File.join( File.dirname(__FILE__), "..", "..", "..", "templates" ) ), [current_dir, name], context ) end |