Method: String::Mask#+
- Defined in:
- lib/strmask.rb
#+(other) ⇒ Object Also known as: |
Mask ADD. As long as there is a value other then empty the character filters though. The last to_str takes precedence.
"abc..123" "ab..789."
+ "ab..789." + "abc..123"
---------- ----------
"abc.7893" "abc.7123"
99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/strmask.rb', line 99 def +(other) other = convert(other) i = 0 o = '' while i < to_str.size if other[i,1] == ESC o << to_str[i,1] else o << other[i,1] end i += 1 end self.class.new(o) end |