Sha256: 121bff51b35bf08a4583fa397654f11356a9e5a685137a722ce734d7993b3c28

Contents?: true

Size: 373 Bytes

Versions: 37

Compression:

Stored size: 373 Bytes

Contents

module Plutonium
  module Query
    class AdhocBlock < Base
      attr_reader :body

      # Initializes a AdhocBlock with a given block of code.
      #
      # @param body [Proc] The block of code for the query.
      def initialize(body)
        super()
        @body = body
      end

      def apply(scope, **)
        body.call(scope, **)
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
plutonium-0.19.2 lib/plutonium/query/adhoc_block.rb
plutonium-0.19.1 lib/plutonium/query/adhoc_block.rb
plutonium-0.19.0 lib/plutonium/query/adhoc_block.rb
plutonium-0.18.8 lib/plutonium/query/adhoc_block.rb
plutonium-0.18.7 lib/plutonium/query/adhoc_block.rb
plutonium-0.18.6 lib/plutonium/query/adhoc_block.rb
plutonium-0.18.5 lib/plutonium/query/adhoc_block.rb
plutonium-0.18.4 lib/plutonium/query/adhoc_block.rb
plutonium-0.18.3 lib/plutonium/query/adhoc_block.rb
plutonium-0.18.2 lib/plutonium/query/adhoc_block.rb
plutonium-0.18.1 lib/plutonium/query/adhoc_block.rb
plutonium-0.18.0 lib/plutonium/query/adhoc_block.rb
plutonium-0.16.5 lib/plutonium/query/adhoc_block.rb
plutonium-0.16.4 lib/plutonium/query/adhoc_block.rb
plutonium-0.16.3 lib/plutonium/query/adhoc_block.rb
plutonium-0.16.1 lib/plutonium/query/adhoc_block.rb
plutonium-0.16.0 lib/plutonium/query/adhoc_block.rb
plutonium-0.15.24 lib/plutonium/query/adhoc_block.rb
plutonium-0.15.23 lib/plutonium/query/adhoc_block.rb
plutonium-0.15.22 lib/plutonium/query/adhoc_block.rb