Sha256: 7fc87a7b0b8cc192559aec3bfb6e9bcacd56a59aeb93a5fa15558a928082b798

Contents?: true

Size: 315 Bytes

Versions: 11

Compression:

Stored size: 315 Bytes

Contents

module Plumbing
  class RubberDuck
    ::Object.class_eval do
      # Cast the object to a duck-type
      # @param type [Plumbing::RubberDuck, Module]
      # @return [Plumbing::RubberDuck::Proxy] the duck-type proxy
      def as type
        Plumbing::RubberDuck.cast self, type: type
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
standard-procedure-plumbing-0.5.2 lib/plumbing/rubber_duck/object.rb
standard-procedure-plumbing-0.5.1 lib/plumbing/rubber_duck/object.rb
standard-procedure-plumbing-0.5.0 lib/plumbing/rubber_duck/object.rb
standard-procedure-plumbing-0.4.6 lib/plumbing/rubber_duck/object.rb
standard-procedure-plumbing-0.4.5 lib/plumbing/rubber_duck/object.rb
standard-procedure-plumbing-0.4.4 lib/plumbing/rubber_duck/object.rb
standard-procedure-plumbing-0.4.3 lib/plumbing/rubber_duck/object.rb
standard-procedure-plumbing-0.4.2 lib/plumbing/rubber_duck/object.rb
standard-procedure-plumbing-0.4.1 lib/plumbing/rubber_duck/object.rb
standard-procedure-plumbing-0.4.0 lib/plumbing/rubber_duck/object.rb
standard-procedure-plumbing-0.3.3 lib/plumbing/rubber_duck/object.rb