Sha256: b7615f30febc57f65241071d4e276e80dc7db08d16961cacb02a78d9220e028c

Contents?: true

Size: 569 Bytes

Versions: 5

Compression:

Stored size: 569 Bytes

Contents

module Checked
  class Demand
    module DSL
      
      def demand! target, *args
        if block_given?
          raise "No block allowed here."
        end
        
        Demand.new(target) { |d|
          d.<< args
        }.target
      end
      
      def named_demand! name, target, *args
        if block_given?
          raise "No block allowed here."
        end
        
        Demand.new(target) { |d|
          d.* name
          d.<< args
        }.target
      end
      
    end # === module Dsl
  end # === class Demand
end # === module Checked

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
Checked-0.1.4 lib/Checked/Demand/DSL.rb
Checked-0.1.3 lib/Checked/Demand/DSL.rb
Checked-0.1.2 lib/Checked/Demand/DSL.rb
Checked-0.1.1 lib/Checked/Demand/DSL.rb
Checked-0.1.0 lib/Checked/Demand/DSL.rb