Method: Flow::Reference::Currencies.find

Defined in:
lib/flow-reference.rb

.find(currency_code) ⇒ Object



13
14
15
16
17
18
# File 'lib/flow-reference.rb', line 13

def find(currency_code)
  code = currency_code.to_s.downcase.gsub(/[^\w]/, '').capitalize
  return nil unless code.length == 3
  return nil unless Data.respond_to?(code)
  Data.send(code)
end