Sha256: b88e4a280e19225de5c7162a72a9907d3e233c7b7926f85a18a8b668e7a0ffbd

Contents?: true

Size: 545 Bytes

Versions: 2

Compression:

Stored size: 545 Bytes

Contents

module ActiveGenerator
  module Base

    private

    def file_name_table
      file_name.underscore
    end

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

    def namespace
      name.downcase.split("/").delete_last
    end

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

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

    def namespace_table
      namespace.join("_")
    end

    def namespace_path
      namespace.join("/")
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
active_generator-2.2.8 lib/active_generator/base.rb
active_generator-2.2.7 lib/active_generator/base.rb