Sha256: c32426798e15583709255aa47fde971025c99e1f02f975d51218c7512283c718
Contents?: true
Size: 703 Bytes
Versions: 8
Compression:
Stored size: 703 Bytes
Contents
module Sprinkle module Deployment def deployment(&block) @deployment = Deployment.new(&block) end class Deployment attr_accessor :style, :defaults def initialize(&block) @defaults = {} self.instance_eval(&block) raise 'No delivery mechanism defined' unless @style end def delivery(type, &block) @style = Actors.const_get(type.to_s.titleize).new &block end def method_missing(sym, *args, &block) @defaults[sym] = block end def respond_to?(sym); !!@defaults[sym]; end def process POLICIES.each do |policy| policy.process(self) end end end end end
Version data entries
8 entries across 8 versions & 3 rubygems