Sha256: 3367816885f88607c01d9e0806a9e66ddea7ddcf35d4c0963a29b73b80111255
Contents?: true
Size: 738 Bytes
Versions: 6
Compression:
Stored size: 738 Bytes
Contents
module Leap class Decision attr_reader :goal, :signature_method, :committees def initialize(goal, options) @goal = goal @signature_method = options[:with] || {} @committees = [] end def make(characteristics, *considerations) committees.reverse.inject(characteristics) do |characteristics, committee| if report = committee.report(characteristics, considerations) characteristics[committee.name] = report end characteristics end[goal] end include ::Blockenspiel::DSL def committee(name, &blk) committee = ::Leap::Committee.new(name) @committees << committee ::Blockenspiel.invoke blk, committee end end end
Version data entries
6 entries across 6 versions & 1 rubygems