module Dwarf::Strategies

Defined in:

dwarf/services/amber.cr
dwarf/services/common.cr
dwarf/services/kemal.cr
dwarf/strategies.cr
dwarf/strategies/base.cr

Class Method Summary

Macro Summary

Class Method Detail

def self.[](name : String) : Dwarf::Strategies::Base #

Provides access to strategies by label


[View source]
def self.[]?(name : String) : Dwarf::Strategies::Base | Nil #

Same as .[], but returns nil if it was not exists


[View source]
def self.clear! #

Clears all declared.


[View source]
def self.keys #

Returns name of strategies


[View source]
def self.register(name : String, strategy : Dwarf::Strategies::Base) #

Add a strategy with given instanced strategy


[View source]
def self.values #

Returns instanced strageties


[View source]

Macro Detail

macro register(name, &block) #

Create a strategy, add and store it in a hash.


[View source]