# File lib/versionomy/format.rb, line 139 def get(name_, strict_=false) name_ = _check_name(name_) format_ = @mutex.synchronize{ @names_to_formats[name_] } if format_.nil? # Attempt to find the format in the directory path dirs_ = @mutex.synchronize{ @directories.dup } dirs_.each do |dir_| path_ = "#{dir_}/#{name_}.rb" if ::File.readable?(path_) @load_mutex.synchronize{ ::Kernel.load(path_) } end format_ = @mutex.synchronize{ @names_to_formats[name_] } break unless format_.nil? end end if format_.nil? && strict_ raise Errors::UnknownFormatError, name_ end format_ end