Class: Makit::Cli::Generators::RubyGenerator

Inherits:
BaseGenerator show all
Defined in:
lib/makit/cli/generators/ruby_generator.rb

Overview

Generator for Ruby gem projects

Instance Attribute Summary

Attributes inherited from BaseGenerator

#name, #options

Instance Method Summary collapse

Methods inherited from BaseGenerator

#generate, #initialize

Constructor Details

This class inherits a constructor from Makit::Cli::Generators::BaseGenerator

Instance Method Details

#display_custom_next_stepsObject



35
36
37
38
39
# File 'lib/makit/cli/generators/ruby_generator.rb', line 35

def display_custom_next_steps
  puts "  bundle install"
  puts "  bundle exec rake test"
  super
end

#file_definitionsObject



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/makit/cli/generators/ruby_generator.rb', line 18

def file_definitions
  {
    "Gemfile" => :gemfile_content,
    "#{name}.gemspec" => :gemspec_content,
    "lib/#{name}.rb" => :main_lib_content,
    "lib/#{name}/version.rb" => :version_content,
    "Rakefile" => :rakefile_content,
    "README.md" => :readme_content,
    "test/test_helper.rb" => :test_helper_content,
    "test/#{name}_test.rb" => :test_content,
  }
end

#project_typeObject



31
32
33
# File 'lib/makit/cli/generators/ruby_generator.rb', line 31

def project_type
  "Ruby gem"
end