Sha256: 197db44109f9433f89630c0392d3217c1c1984df5fca7eabbdbf5042869369ac

Contents?: true

Size: 624 Bytes

Versions: 7

Compression:

Stored size: 624 Bytes

Contents

# frozen_string_literal: true

require "rails"

module RbsActivesupport
  class InstallGenerator < Rails::Generators::Base
    def create_raketask
      create_file "lib/tasks/rbs_activesupport.rake", <<~RUBY
        # frozen_string_literal: true

        begin
          require 'rbs_activesupport/rake_task'

          RbsActivesupport::RakeTask.new do |task|
            # The target directories
            # task.target_directories = [Rails.root / "app"]
          end
        rescue LoadError
          # failed to load rbs_activesupport. Skip to load rbs_activesupport tasks.
        end
      RUBY
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rbs_activesupport-1.4.3 lib/generators/rbs_activesupport/install_generator.rb
rbs_activesupport-1.4.2 lib/generators/rbs_activesupport/install_generator.rb
rbs_activesupport-1.4.1 lib/generators/rbs_activesupport/install_generator.rb
rbs_activesupport-1.4.0 lib/generators/rbs_activesupport/install_generator.rb
rbs_activesupport-1.3.0 lib/generators/rbs_activesupport/install_generator.rb
rbs_activesupport-1.2.1 lib/generators/rbs_activesupport/install_generator.rb
rbs_activesupport-1.2.0 lib/generators/rbs_activesupport/install_generator.rb