Class: RbsHeuristicPrototype::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/rbs_heuristic_prototype/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_raketaskObject



7
8
9
10
11
12
13
14
15
16
# File 'lib/generators/rbs_heuristic_prototype/install_generator.rb', line 7

def create_raketask
  create_file "lib/tasks/rbs_heuristic_prototype.rake", <<~RUBY
    begin
      require 'rbs_heuristic_prototype/rake_task'
      RbsHeuristicPrototype::RakeTask.new
    rescue LoadError
      # failed to load rbs_heuristic_prototype. Skip to load rbs_heuristic_prototype tasks.
    end
  RUBY
end