Sha256: 3d7706ca1f834291865d9b311f53a8859ab44d27f3dfbd3176fbae99c364512d

Contents?: true

Size: 621 Bytes

Versions: 4

Compression:

Stored size: 621 Bytes

Contents

module Bogus
  module FakeObject
    # marker for fake objects
  end

  class Fake
    include RecordInteractions
    extend RecordInteractions
    include FakeObject
    extend FakeObject

    def initialize(*args)
    end

    def to_s
      "#<#{self.class}:0x#{object_id.to_s(16)}>"
    end

    def kind_of?(klass)
      klass == self.class.__copied_class__
    end

    def instance_of?(klass)
      klass == self.class.__copied_class__
    end

    class << self
      attr_accessor :__copied_class__

      def name
        __copied_class__.name
      end

      def to_s
        name
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bogus-0.0.4 lib/bogus/fake.rb
bogus-0.0.3 lib/bogus/fake.rb
bogus-0.0.3.rc.2 lib/bogus/fake.rb
bogus-0.0.3.rc.1 lib/bogus/fake.rb