Sha256: 60a1185147687c30f61bb7dec70f816e9f6aa0ec9b76a1ee6f981657c882b9be

Contents?: true

Size: 1.28 KB

Versions: 12

Compression:

Stored size: 1.28 KB

Contents

module Coprl
  module Presenters
    module Generators
      module Inflectors
        def classify(input)
          # "books" => "Book"
          @inflector.classify(input)
        end

        def pluralize(input)
          #book" => "books"
          @inflector.pluralize(input)
        end

        def singularize(input)
          #"books" => "book"
          @inflector.singularize(input)
        end

        def camelize(input)
          # "dry/inflector" => "Dry::Inflector"
          @inflector.camelize(input)
        end

        def tableize(input)
          # "Book" => "books"
          @inflector.tableize(input)
        end

        def dasherize(input)
          # "dry_inflector" => "dry-inflector"
          @inflector.dasherize(input)
        end

        def underscore(input)
          # "dry-inflector" => "dry_inflector"
          @inflector.underscore(input)
        end

        def demodulize(input)
          # "Dry::Inflector"  => "Inflector"
          @inflector.demodulize(input)
        end

        def humanize(input)
          # "dry_inflector"  => "Dry inflector", "author_id" => "Author"
          @inflector.humanize(input)
        end

        def ordinalize(input)
          # 1 => "1st
          @inflector.ordinalize(input)
        end

      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
coprl-3.0.0.beta.12 lib/coprl/presenters/generators/inflectors.rb
coprl-3.0.0.beta.11 lib/coprl/presenters/generators/inflectors.rb
coprl-3.0.0.beta.10 lib/coprl/presenters/generators/inflectors.rb
coprl-3.0.0.beta.9 lib/coprl/presenters/generators/inflectors.rb
coprl-3.0.0.beta.8 lib/coprl/presenters/generators/inflectors.rb
coprl-3.0.0.beta.7 lib/coprl/presenters/generators/inflectors.rb
coprl-3.0.0.beta.6 lib/coprl/presenters/generators/inflectors.rb
coprl-3.0.0.beta.5 lib/coprl/presenters/generators/inflectors.rb
coprl-3.0.0.beta.4 lib/coprl/presenters/generators/inflectors.rb
coprl-3.0.0.beta.3 lib/coprl/presenters/generators/inflectors.rb
coprl-3.0.0.beta.2 lib/coprl/presenters/generators/inflectors.rb
coprl-3.0.0.beta.1 lib/coprl/presenters/generators/inflectors.rb