Module: KeyPath::StringExtensions
- Included in:
- String
- Defined in:
- lib/key_path/string/extensions.rb
Overview
Extensions to String.
Instance Method Summary collapse
Instance Method Details
#is_number? ⇒ Boolean
18 19 20 |
# File 'lib/key_path/string/extensions.rb', line 18 def is_number? true if Float(self) rescue false end |
#is_plural? ⇒ Boolean
14 15 16 |
# File 'lib/key_path/string/extensions.rb', line 14 def is_plural? singularize != self && pluralize == self end |
#is_singular? ⇒ Boolean
10 11 12 |
# File 'lib/key_path/string/extensions.rb', line 10 def is_singular? pluralize != self && singularize == self end |