Class: Laranja::Base

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

Direct Known Subclasses

Address, CPF, Gender, Internet, Name

Class Method Summary collapse

Class Method Details

.strf(format) ⇒ Object



7
8
9
# File 'lib/laranja.rb', line 7

def self.strf(format)
  format.gsub(/(:(?<scope>[^:\s\z]+))?%(?<key>[^%\s\z]+)/) { data_sample($~[:key], $~[:scope]) }
end