Class: Penetration::Preset

Inherits:
Object
  • Object
show all
Defined in:
lib/penetration.rb

Defined Under Namespace

Classes: NotFound

Class Method Summary collapse

Class Method Details

.call(name, &block) ⇒ Object



88
89
90
91
# File 'lib/penetration.rb', line 88

def call(name, &block)
  @preset ||= {}
  @preset[name.to_sym] = yield
end

.find(name) ⇒ Object



93
94
95
# File 'lib/penetration.rb', line 93

def find(name)
  @preset[name.to_sym] || (raise NotFound)
end