Sha256: 17374b05bc949d836046882281588556ce006f2cb4a117775a4447cfff1cd814

Contents?: true

Size: 294 Bytes

Versions: 2

Compression:

Stored size: 294 Bytes

Contents

module Str2Duck
  module MPatch
    module ObjectEXT

      def to_duck
        if self.class <= String
          Str2Duck.parse(self)
        else
          return self
        end

      end

      alias :duck :to_duck

    end
  end
end

Object.__send__ :include, Str2Duck::MPatch::ObjectEXT

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
str2duck-1.7.1 lib/str2duck/mpatch/object.rb
str2duck-1.7.0 lib/str2duck/mpatch/object.rb