class Berkshelf::Location

def klass_from_options(options)

Returns:
  • (Class, nil) -
def klass_from_options(options)
  options.each do |key, _|
    id = key.to_s.capitalize
    begin
      return Berkshelf.const_get("#{id}Location")
    rescue NameError; end
  end
  nil
end