Class: Bogus::Fake
- Inherits:
-
Object
- Object
- Bogus::Fake
- Extended by:
- FakeObject, RecordInteractions
- Includes:
- FakeObject, RecordInteractions
- Defined in:
- lib/bogus/fakes/fake.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ Fake
constructor
A new instance of Fake.
- #kind_of?(klass) ⇒ Boolean (also: #instance_of?, #is_a?)
- #to_s ⇒ Object
Methods included from RecordInteractions
Constructor Details
#initialize(*args) ⇒ Fake
Returns a new instance of Fake.
12 13 14 |
# File 'lib/bogus/fakes/fake.rb', line 12 def initialize(*args) __shadow__ end |
Class Method Details
.__create__ ⇒ Object
29 |
# File 'lib/bogus/fakes/fake.rb', line 29 alias :__create__ :new |
.new(*args, &block) ⇒ Object
31 32 33 34 35 |
# File 'lib/bogus/fakes/fake.rb', line 31 def new(*args, &block) value = __record__(:new, *args, &block) return value unless ::Bogus::UndefinedReturnValue.undefined?(value) __create__ end |
Instance Method Details
#kind_of?(klass) ⇒ Boolean Also known as: instance_of?, is_a?
20 21 22 23 |
# File 'lib/bogus/fakes/fake.rb', line 20 def kind_of?(klass) copied_class = self.class.__copied_class__ super || BaseClassIdentifier.base_class?(copied_class, klass) end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/bogus/fakes/fake.rb', line 16 def to_s "#<#{self.class}:0x#{object_id.to_s(16)}>" end |