Sha256: 90db76d218c83ec66eeafed166580a0645d3da1d21771582ca57f1de90ca8317
Contents?: true
Size: 786 Bytes
Versions: 4
Compression:
Stored size: 786 Bytes
Contents
module Leap class Committee attr_reader :name, :quorums def initialize(name) @name = name @quorums = [] end def report(characteristics, considerations, options = {}) quorums.grab do |quorum| next unless quorum.satisfied_by? characteristics and quorum.complies_with? Array.wrap(options[:comply]) if conclusion = quorum.acknowledge(characteristics.slice(*quorum.characteristics), considerations.dup) ::Leap::Report.new self, quorum => conclusion end end end include ::Blockenspiel::DSL def quorum(name, options = {}, &blk) @quorums << ::Leap::Quorum.new(name, options, blk) end def default(options = {}, &blk) quorum 'default', options, &blk end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
leap-0.4.3 | lib/leap/committee.rb |
leap-0.4.2 | lib/leap/committee.rb |
leap-0.4.1 | lib/leap/committee.rb |
leap-0.4.0 | lib/leap/committee.rb |