Class: ChefSpec::Stubs::SearchRegistry

Inherits:
Registry
  • Object
show all
Defined in:
lib/chefspec/stubs/search_registry.rb

Instance Attribute Summary

Attributes inherited from Registry

#stubs

Instance Method Summary collapse

Methods inherited from Registry

#initialize, #register, #reset!

Constructor Details

This class inherits a constructor from ChefSpec::Stubs::Registry

Instance Method Details

#stub_for(type, query = "*:*") ⇒ Object



6
7
8
9
10
# File 'lib/chefspec/stubs/search_registry.rb', line 6

def stub_for(type, query = "*:*")
  @stubs.find do |stub|
    stub.type.to_s == type.to_s && stub.query === query
  end
end