Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/extensions/string.rb

Instance Method Summary collapse

Instance Method Details

#apply_mask(mask) ⇒ Object



2
3
4
5
6
7
# File 'lib/extensions/string.rb', line 2

def apply_mask(mask)        
  str = mask.gsub(/#/).each_with_index do |ch, i|
    self.each_char.entries[i]
  end    
  str
end