Method: String::Mask#apply

Defined in:
lib/strmask.rb

#apply(s = nil, *a, &b) ⇒ Object

Apply a method to the internal string and return a new mask.



201
202
203
204
205
206
207
208
209
# File 'lib/strmask.rb', line 201

def apply(s=nil, *a, &b)
  if s
    to_str.send(s,*a,&b).to_mask
  else
    @_self ||= Functor.new do |op, *a|
      to_str.send(op,*a).to_mask
    end
  end
end