class TidyI18n::Locales::Reverse
Constants
- INTERPOLATION_SEGMENT
Public Instance Methods
convert(value)
click to toggle source
# File lib/tidy_i18n/locales/reverse.rb, line 7 def convert(value) reverse_interpolation_segments(value).reverse end
Private Instance Methods
reverse_interpolation_segments(value)
click to toggle source
# File lib/tidy_i18n/locales/reverse.rb, line 13 def reverse_interpolation_segments(value) interpolation_segment_match = value.match(INTERPOLATION_SEGMENT) if interpolation_segment_match interpolation_segment = interpolation_segment_match[1] value.sub!(INTERPOLATION_SEGMENT, interpolation_segment.reverse) reverse_interpolation_segments(value) end value end