Class: DevSystem::GemfileGenerator

Inherits:
SimpleGenerator show all
Defined in:
lib/dev_system/generators/gemfile_generator.rb

Instance Attribute Summary

Attributes inherited from BaseGenerator

#env

Instance Method Summary collapse

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

get_generator_signatures

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_defaultObject

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_nameObject



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