From a quick look at the implementations, it wasn't immediately apparent that these two methods could be operated on like this. How would you feel about extracting out the similar logic in `unsafe_prefixes` and `safe_prefixes` into something like this: 
```ruby
      def self.unsafe_prefixes(gsb_hashes)
        get_prefix_list(AddShavar, gsb_hashes)
      end

      def self.safe_prefixes(gsb_hashes)
        get_prefix_list(SubShavar, gsb_hashes)
      end

      def self.get_prefix_list(klass, gsb_hashes)
        prefixes = gsb_hashes.map { |h| h.prefix }
        klass.where(prefix: prefixes).map { |s| [ s.list, s.prefix ] }
      end
```