aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/erb.rb
blob: ce2c482eb56c13e2e0e9d32929353643d56667c3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# frozen_string_literal: true
require "rails/generators/named_base"

module Erb # :nodoc:
  module Generators # :nodoc:
    class Base < Rails::Generators::NamedBase #:nodoc:
      private

        def formats
          [format]
        end

        def format
          :html
        end

        def handler
          :erb
        end

        def filename_with_extensions(name, file_format = format)
          [name, file_format, handler].compact.join(".")
        end
    end
  end
end