Class: Gemstrap::Generator
- Inherits:
-
Object
- Object
- Gemstrap::Generator
show all
- Includes:
- FileUtils, Term::ANSIColor
- Defined in:
- lib/gemstrap/generator.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
22
23
24
25
|
# File 'lib/gemstrap/generator.rb', line 22
def method_missing(method, *args, &block)
return context[method] if context.include?(method)
super
end
|
Instance Method Details
#run(args) ⇒ Object
12
13
14
15
16
17
18
19
20
|
# File 'lib/gemstrap/generator.rb', line 12
def run(args)
options.merge!(args)
puts "gemstrap: creating gem #{yellow(gem_name)}"
say_args(args)
generate!
rescue => e
puts e.message
puts e.backtrace.join("\n")
end
|