Module: Naught::StubStrategy::ReturnSelf Private
- Defined in:
- lib/naught/stub_strategy.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Stub that returns self from any method (black hole)
Class Method Summary collapse
-
.apply(subject, name) ⇒ void
private
Define a method that returns self.
Class Method Details
.apply(subject, name) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Define a method that returns self
25 26 27 |
# File 'lib/naught/stub_strategy.rb', line 25 def self.apply(subject, name) subject.define_method(name) { |*, **, &| self } end |