Class: ActiveSupport::Inflector::Inflections

Inherits:
Object
  • Object
show all
Defined in:
lib/pluralize/active_support/inflector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#procsObject (readonly)

Returns the value of attribute procs.



33
34
35
# File 'lib/pluralize/active_support/inflector.rb', line 33

def procs
  @procs
end

Instance Method Details

#default_procObject



40
41
42
# File 'lib/pluralize/active_support/inflector.rb', line 40

def default_proc
  @procs[@procs.keys.first]
end

#proc(locale, proc) ⇒ Object



35
36
37
38
# File 'lib/pluralize/active_support/inflector.rb', line 35

def proc(locale, proc)
  @procs = {} if @procs.nil?
  @procs[locale.to_sym] = proc
end