Class: Makit::Cli::Generators::Templates::Ruby::Gemfile

Inherits:
Object
  • Object
show all
Defined in:
lib/makit/cli/generators/templates/ruby/gemfile.rb

Overview

Template for Ruby gem Gemfile

Instance Method Summary collapse

Constructor Details

#initialize(project_name) ⇒ Gemfile

Returns a new instance of Gemfile.



10
11
12
# File 'lib/makit/cli/generators/templates/ruby/gemfile.rb', line 10

def initialize(project_name)
  @project_name = project_name
end

Instance Method Details

#renderObject



14
15
16
17
18
19
20
# File 'lib/makit/cli/generators/templates/ruby/gemfile.rb', line 14

def render
  <<~GEMFILE
    source "https://rubygems.org"

    gem "#{@project_name}"
  GEMFILE
end