Class: Crispy::CrispyInternal::Double
- Inherits:
-
Object
- Object
- Crispy::CrispyInternal::Double
- Includes:
- WithStubber
- Defined in:
- lib/crispy/crispy_internal/double.rb
Instance Method Summary collapse
-
#initialize(name_or_stubs_map = nil, stubs_map = {}) ⇒ Double
constructor
A new instance of Double.
Methods included from WithStubber
Constructor Details
#initialize(name_or_stubs_map = nil, stubs_map = {}) ⇒ Double
Returns a new instance of Double.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/crispy/crispy_internal/double.rb', line 8 def initialize name_or_stubs_map = nil, stubs_map = {} if name_or_stubs_map.is_a? ::Hash @name = ''.freeze initialize_stubber(name_or_stubs_map) else @name = name_or_stubs_map initialize_stubber(stubs_map) end singleton_class = class << self self end prepend_stubber singleton_class end |