class Flow::Reference::Continents
Public Class Methods
find(continent_code)
click to toggle source
# File lib/flow-reference.rb, line 58 def find(continent_code) code = continent_code.to_s.downcase.gsub(/[^\w]/,"").capitalize return nil unless code.length == 3 return nil unless Data.respond_to?(code) Data.send(code) end
find!(continent_code)
click to toggle source
# File lib/flow-reference.rb, line 65 def find!(continent_code) find(continent_code) || raise(ArgumentError, 'Continent "%s" is not found' % continent_code) end