Module: Humanoid::Extensions::Symbol::Inflections

Included in:
Symbol
Defined in:
lib/humanoid/extensions/symbol/inflections.rb

Overview

:nodoc:

Constant Summary collapse

REVERSALS =
{
  :asc => :desc,
  :ascending => :descending,
  :desc => :asc,
  :descending => :ascending
}

Instance Method Summary collapse

Instance Method Details

#invertObject



14
15
16
# File 'lib/humanoid/extensions/symbol/inflections.rb', line 14

def invert
  REVERSALS[self]
end

#plural?Boolean

Returns:



22
23
24
# File 'lib/humanoid/extensions/symbol/inflections.rb', line 22

def plural?
  to_s.plural?
end

#singular?Boolean

Returns:



18
19
20
# File 'lib/humanoid/extensions/symbol/inflections.rb', line 18

def singular?
  to_s.singular?
end