Class: Cli::Commands::NewApp::Files::Rakefile

Inherits:
Object
  • Object
show all
Defined in:
lib/cli/commands/new_app/files/rakefile.rb

Class Method Summary collapse

Class Method Details

.callObject



8
9
10
# File 'lib/cli/commands/new_app/files/rakefile.rb', line 8

def self.call
  File.write("Rakefile", content)
end

.contentObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/cli/commands/new_app/files/rakefile.rb', line 12

def self.content
  <<~RUBY
    # typed: false
    # frozen_string_literal: true

    require "rake"
    require_relative "app"

    kirei_gem_path = Gem::Specification.find_by_name("kirei").gem_dir
    Dir.glob("\#{kirei_gem_path}/lib/tasks/**/*.rake").each { import(_1) }

    Dir.glob("lib/tasks/**/*.rake").each { import(_1) }

  RUBY
end