Sha256: cb053cc5d9fe516a710fbd6ecdb3a9101ac6df87b63b1d0822ed22b95b9f4cab

Contents?: true

Size: 737 Bytes

Versions: 2

Compression:

Stored size: 737 Bytes

Contents

module BEncodr
  module Ext
    def self.include!
      include_string!
      include_integer!
      include_list!
      include_dictionary!
      include_io!
    end
    
    private
    
    def self.include_string!
      ::String.send :include, Object
      [::String, Symbol, URI::Generic].each do |stringable|
        stringable.send :include, String
      end
    end
    
    def self.include_integer!
      [Numeric, Time].each do |intable|
        intable.send :include, Integer
      end
    end
    
    def self.include_list!
      Array.send :include, List
    end
    
    def self.include_dictionary!
      Hash.send :include, Dictionary
    end
    
    def self.include_io!
      ::IO.send :include, IO
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bencodr-2.0.1 lib/bencodr/ext.rb
bencodr-2.0.0 lib/bencodr/ext.rb