Sha256: efe72ed86217d13c894977d9edd16e7f3145be067ffc15172ece0d2f62dbf390

Contents?: true

Size: 608 Bytes

Versions: 3

Compression:

Stored size: 608 Bytes

Contents

module ActiveGenerator
  module Base

    private

    def file_name_table
      file_name.underscore
    end

    def file_name_human
      file_name_table.gsub('_'.freeze, ' '.freeze).downcase.capitalize
    end

    def namespace
      name.downcase.split('/'.freeze).delete_last
    end

    def namespaced?
      name.include?('/'.freeze)
    end

    def namespace_human
      namespace.join(' '.freeze).gsub('_'.freeze, ' '.freeze).downcase.capitalize
    end

    def namespace_table
      namespace.join('_'.freeze)
    end

    def namespace_path
      namespace.join('/'.freeze)
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
active_generator-2.4.0 lib/active_generator/base.rb
active_generator-2.3.1 lib/active_generator/base.rb
active_generator-2.3.0 lib/active_generator/base.rb