Sha256: f94dd79f2f21dfa084a69a29f6802f4a1271c80db4b129d65ad4e66da159e637

Contents?: true

Size: 443 Bytes

Versions: 2

Compression:

Stored size: 443 Bytes

Contents

module Str2Duck

  module MPatch

    module Object

      def duck(self_obj= self)
        if self_obj.class <= String
          Str2Duck::MPatch::String.duck(self_obj)
        else
          return self_obj
        end
      end

      alias :to_duck :duck

      self.instance_methods.each do |symbol|
        module_function symbol
        public symbol
      end

    end

  end

end

Object.__send__( :include, Str2Duck::MPatch::Object )

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
str2duck-1.3.1 lib/str2duck/mpatch/object.rb
str2duck-1.3.0 lib/str2duck/mpatch/object.rb