Sha256: 8de5f98d3ce3d2596ed54d6b72181e1f4e150a407911c85d6e1189ef2c92e09f
Contents?: true
Size: 642 Bytes
Versions: 5
Compression:
Stored size: 642 Bytes
Contents
# frozen_string_literal: true require 'rails/generators' module Buoys class InstallGenerator < Rails::Generators::Base source_root File.expand_path('templates', __dir__) class_option :template def create_files copy_file 'buoys.en.yml', 'config/locales/buoys.en.yml' copy_file 'breadcrumbs.rb', 'config/buoys/breadcrumbs.rb' if %w(haml slim).include?(template_type = options[:template]) copy_file "_buoys.html.#{template_type}", "app/views/breadcrumbs/_buoys.html.#{template_type}" else copy_file '_buoys.html.erb', 'app/views/breadcrumbs/_buoys.html.erb' end end end end
Version data entries
5 entries across 5 versions & 1 rubygems