Sha256: b9c847fe309e0bbc01a1645499c484eec642e6bc655a278b2fc1fa94b1f1c55f
Contents?: true
Size: 548 Bytes
Versions: 19
Compression:
Stored size: 548 Bytes
Contents
# frozen_string_literal: true require "forwardable" require "singleton" module HTTP module MimeType # Base encode/decode MIME type adapter class Adapter include Singleton class << self extend Forwardable def_delegators :instance, :encode, :decode end %w[encode decode].each do |operation| class_eval <<-RUBY, __FILE__, __LINE__ def #{operation}(*) fail Error, "\#{self.class} does not supports ##{operation}" end RUBY end end end end
Version data entries
19 entries across 19 versions & 1 rubygems