Class: HumanizableString
- Inherits:
-
String
- Object
- String
- HumanizableString
- Defined in:
- lib/assignable_values/humanizable_string.rb
Overview
A String that responds to #humanized. Earlier versions of assignable_values dependent on such an API.
Instance Method Summary collapse
- #humanized ⇒ Object
-
#initialize(string, humanization) ⇒ HumanizableString
constructor
A new instance of HumanizableString.
Constructor Details
#initialize(string, humanization) ⇒ HumanizableString
Returns a new instance of HumanizableString.
5 6 7 8 |
# File 'lib/assignable_values/humanizable_string.rb', line 5 def initialize(string, humanization) super(string) @humanization = humanization end |
Instance Method Details
#humanized ⇒ Object
10 11 12 13 |
# File 'lib/assignable_values/humanizable_string.rb', line 10 def humanized ActiveSupport::Deprecation.warn("assignable_<value>.humanized is deprecated, use humanized_assignable_<value>s.humanized instead", caller) @humanization end |