Class: DevSystem::GemfileGenerator
- Inherits:
-
SimpleGenerator
- Object
- Liza::Unit
- Liza::Controller
- Generator
- BaseGenerator
- SimpleGenerator
- DevSystem::GemfileGenerator
- Defined in:
- lib/dev_system/generators/gemfile_generator.rb
Instance Attribute Summary
Attributes inherited from BaseGenerator
Instance Method Summary collapse
-
#call_default ⇒ Object
liza g gemfile.
- #get_gemspec_name ⇒ Object
Methods inherited from SimpleGenerator
#add_change, #changes, #copy_examples, #copy_file, #copy_files, #create_controller, #create_file, #create_unit, #inform, #last_change, #name!, #place!, #puts_line, #save
Methods inherited from BaseGenerator
#args, #call, call, #command, get_generator_signatures, #inform, #save
Methods inherited from Generator
Methods inherited from Liza::Controller
color, inherited, on_connected
Methods inherited from Liza::Unit
const_missing, division, part, system, #system, test_class
Instance Method Details
#call_default ⇒ Object
liza g gemfile
5 6 7 8 9 |
# File 'lib/dev_system/generators/gemfile_generator.rb', line 5 def call_default @gemspec_name = get_gemspec_name create_file "Gemfile", :gemfile, :rb end |
#get_gemspec_name ⇒ Object
11 12 13 14 |
# File 'lib/dev_system/generators/gemfile_generator.rb', line 11 def get_gemspec_name ls = Dir["*.gemspec"] ls.first.split(".").first if ls.any? end |