Method: QuickFaker#lookup2
- Defined in:
- lib/quick_faker.rb
#lookup2(s) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/quick_faker.rb', line 56 def lookup2(s) found = @h[s.to_sym] if found and found[0].is_a? Array then found.map(&:last) elsif found[0] found.last else puts ('*' + s.to_s + '* not found').warning puts ('try: ').info @a.grep(/#{s}/i)[/[^\.]+$/].uniq.sort end end |