Module: ManageIQ::API::Common::Inflections

Defined in:
lib/manageiq/api/common/inflections.rb

Class Method Summary collapse

Class Method Details

.load_common_inflectionsObject



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/manageiq/api/common/inflections.rb', line 12

def self.load_common_inflections
  # Add new inflection rules using the following format
  # (all these examples are active by default):
  # ActiveSupport::Inflector.inflections do |inflect|
  #   inflect.plural /^(ox)$/i, '\1en'
  #   inflect.singular /^(ox)en/i, '\1'
  #   inflect.irregular 'person', 'people'
  #   inflect.uncountable %w( fish sheep )
  # end
  ActiveSupport::Inflector.inflections do |inflect|
    inflect.acronym('ManageIQ')
  end
end

.load_inflectionsObject



5
6
7
8
9
10
# File 'lib/manageiq/api/common/inflections.rb', line 5

def self.load_inflections
  @loaded ||= begin
    load_common_inflections
    true
  end
end