Method: Hx::Interop::ContentTypes#load

Defined in:
lib/interop/content_types.rb

#load(content_type, str) ⇒ Object



28
29
30
31
32
33
34
# File 'lib/interop/content_types.rb', line 28

%i[load dump encode encode_to].each do |name|
  class_eval <<-RUBY, __FILE__, __LINE__ + 1
    def #{name}(content_type, *args)          # def load(content_type, *args)
      delegate content_type, :#{name}, *args  #   delegate content_type, :load, *args
    end                                       # end
  RUBY
end