Sha256: 9efe863b2f5999e61e78c7609b4401047e9a2b640833cd8507fc8589fb1d28ad

Contents?: true

Size: 742 Bytes

Versions: 2

Compression:

Stored size: 742 Bytes

Contents

module Leap
  class Decision
    attr_reader :goal, :signature_method, :committees, :minutes
    
    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
    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

2 entries across 2 versions & 1 rubygems

Version Path
leap-0.2.6 lib/leap/decision.rb
leap-0.2.5 lib/leap/decision.rb