Sha256: 9501b776d9d5e9beff71b5548befb260745f07114113271677b37c2d2485cc17

Contents?: true

Size: 546 Bytes

Versions: 8

Compression:

Stored size: 546 Bytes

Contents

module ActiveGenerator
  module Base

    private

    def file_name_table
      file_name.underscore
    end

    def file_name_human
      file_name_table.split("_").map { |w| w.capitalize }.join(" ")
    end

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

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

    def namespace_human
      namespace.map { |w| w.capitalize }.join(" ")
    end

    def namespace_table
      namespace.join("_")
    end

    def namespace_path
      namespace.join("/")
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
active_generator-2.2.6 lib/active_generator/base.rb
active_generator-2.2.5 lib/active_generator/base.rb
active_generator-2.2.4 lib/active_generator/base.rb
active_generator-2.2.3 lib/active_generator/base.rb
active_generator-2.2.2 lib/active_generator/base.rb
active_generator-2.2.1 lib/active_generator/base.rb
active_generator-2.2.0 lib/active_generator/base.rb
active_generator-2.1.0 lib/active_generator/base.rb