Module: Dry::Plugins::RSpec
- Defined in:
- lib/rspec/dry-plugins.rb
Overview
RSpec helpers for plug-ins
Instance Method Summary collapse
Instance Method Details
#a_plugins_host(name: :Host, parent: nil, &block) ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rspec/dry-plugins.rb', line 28 def a_plugins_host(name: :Host, parent: nil, &block) class_builder = Dry::Core::ClassBuilder.new( name: name, namespace: ::Object, parent: parent ) host = class_builder.call host.module_eval(&block) if block_given? host end |