Sha256: b155976bbe5631f70a47904538ffa0d5c8860d9f660c7d000a89a1d8b7b53c03

Contents?: true

Size: 538 Bytes

Versions: 6

Compression:

Stored size: 538 Bytes

Contents

module ActiveGenerator
  module Base

    private

    def file_name_table
      file_name.underscore
    end

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

    def namespace
      name.downcase.split('/')[0...-1]
    end

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

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

    def namespace_table
      namespace.join('_')
    end

    def namespace_path
      namespace.join('/')
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
active_generator-4.0.6 lib/active_generator/base.rb
active_generator-4.0.5 lib/active_generator/base.rb
active_generator-4.0.4 lib/active_generator/base.rb
active_generator-4.0.3 lib/active_generator/base.rb
active_generator-4.0.2 lib/active_generator/base.rb
active_generator-4.0.0 lib/active_generator/base.rb