Class: Bogus::Fake
- Inherits:
-
Object
- Object
- Bogus::Fake
- Extended by:
- FakeObject, RecordInteractions
- Includes:
- FakeObject, RecordInteractions
- Defined in:
- lib/bogus/fake.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ Fake
constructor
A new instance of Fake.
- #instance_of?(klass) ⇒ Boolean
- #kind_of?(klass) ⇒ Boolean
- #to_s ⇒ Object
Methods included from RecordInteractions
Constructor Details
#initialize(*args) ⇒ Fake
Returns a new instance of Fake.
12 13 14 |
# File 'lib/bogus/fake.rb', line 12 def initialize(*args) __shadow__ end |
Class Method Details
.__create__ ⇒ Object
29 |
# File 'lib/bogus/fake.rb', line 29 alias :__create__ :new |
.name ⇒ Object
36 37 38 |
# File 'lib/bogus/fake.rb', line 36 def name __copied_class__.name end |
.new(*args, &block) ⇒ Object
31 32 33 34 |
# File 'lib/bogus/fake.rb', line 31 def new(*args, &block) __record__(:new, *args, &block) __create__ end |
.to_s ⇒ Object
40 41 42 |
# File 'lib/bogus/fake.rb', line 40 def to_s name end |
Instance Method Details
#instance_of?(klass) ⇒ Boolean
24 25 26 |
# File 'lib/bogus/fake.rb', line 24 def instance_of?(klass) klass == self.class.__copied_class__ end |
#kind_of?(klass) ⇒ Boolean
20 21 22 |
# File 'lib/bogus/fake.rb', line 20 def kind_of?(klass) klass == self.class.__copied_class__ end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/bogus/fake.rb', line 16 def to_s "#<#{self.class}:0x#{object_id.to_s(16)}>" end |