Module: Alba::DefaultInflector
- Defined in:
- lib/alba/default_inflector.rb
Overview
This module has two purposes. One is that we require ‘active_support/inflector` in this module so that we don’t do that all over the place. Another is that ‘ActiveSupport::Inflector` doesn’t have ‘camelize_lower` method that we want it to have, so this module works as an adapter.
Class Method Summary collapse
- .camelize(key) ⇒ Object
-
.camelize_lower(key) ⇒ String
Camelizes a key, 1st letter lowercase.
- .classify(key) ⇒ Object
- .dasherize(key) ⇒ Object
- .demodulize(key) ⇒ Object
- .pluralize(key) ⇒ Object
- .underscore(key) ⇒ Object
Class Method Details
.camelize(key) ⇒ Object
28 |
# File 'lib/alba/default_inflector.rb', line 28 delegate :camelize, :dasherize, :underscore, :classify, :demodulize, :pluralize, to: ActiveSupport::Inflector |
.camelize_lower(key) ⇒ String
Camelizes a key, 1st letter lowercase
35 36 37 |
# File 'lib/alba/default_inflector.rb', line 35 def self.camelize_lower(key) ActiveSupport::Inflector.camelize(key, false) end |
.classify(key) ⇒ Object
28 |
# File 'lib/alba/default_inflector.rb', line 28 delegate :camelize, :dasherize, :underscore, :classify, :demodulize, :pluralize, to: ActiveSupport::Inflector |
.dasherize(key) ⇒ Object
28 |
# File 'lib/alba/default_inflector.rb', line 28 delegate :camelize, :dasherize, :underscore, :classify, :demodulize, :pluralize, to: ActiveSupport::Inflector |
.demodulize(key) ⇒ Object
28 |
# File 'lib/alba/default_inflector.rb', line 28 delegate :camelize, :dasherize, :underscore, :classify, :demodulize, :pluralize, to: ActiveSupport::Inflector |
.pluralize(key) ⇒ Object
28 |
# File 'lib/alba/default_inflector.rb', line 28 delegate :camelize, :dasherize, :underscore, :classify, :demodulize, :pluralize, to: ActiveSupport::Inflector |
.underscore(key) ⇒ Object
28 |
# File 'lib/alba/default_inflector.rb', line 28 delegate :camelize, :dasherize, :underscore, :classify, :demodulize, :pluralize, to: ActiveSupport::Inflector |