module Dwarf::Strategies
Defined in:
dwarf/services/amber.crdwarf/services/common.cr
dwarf/services/kemal.cr
dwarf/strategies.cr
dwarf/strategies/base.cr
Class Method Summary
-
.[](name : String) : Dwarf::Strategies::Base
Provides access to strategies by label
-
.[]?(name : String) : Dwarf::Strategies::Base | Nil
Same as
.[]
, but returns nil if it was not exists -
.clear!
Clears all declared.
-
.keys
Returns name of strategies
-
.register(name : String, strategy : Dwarf::Strategies::Base)
Add a strategy with given instanced strategy
-
.values
Returns instanced strageties
Macro Summary
-
register(name, &block)
Create a strategy, add and store it in a hash.
Class Method Detail
def self.[]?(name : String) : Dwarf::Strategies::Base | Nil
#
Same as .[]
, but returns nil if it was not exists
def self.register(name : String, strategy : Dwarf::Strategies::Base)
#
Add a strategy with given instanced strategy