Sha256: 2f42cd11e35d4a5fa01bd191850c04a000d855389a8d7db8f7468667aba881d5

Contents?: true

Size: 458 Bytes

Versions: 3

Compression:

Stored size: 458 Bytes

Contents

# frozen_string_literal: true

module TailwindViewsGenerator
  module Helpers
    # Return a cleaned up version of the name of the application being generated
    # @return [String]
    def app_name
      @app_name ||= if Rails.version.to_f >= 6.0
                      Rails.app_class.module_parent_name.demodulize.titleize
                    else
                      Rails.application.class.parent.to_s.titleize
                    end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tailwind_views_generator-0.0.3 lib/tailwind_views_generator/helpers.rb
tailwind_views_generator-0.0.2 lib/tailwind_views_generator/helpers.rb
tailwind_views_generator-0.0.1 lib/tailwind_views_generator/helpers.rb