Sha256: df5a054eb6a328d395cc553adf050491cc883a4d7f0208ed1da35e16216e7840

Contents?: true

Size: 608 Bytes

Versions: 5

Compression:

Stored size: 608 Bytes

Contents

# frozen_string_literal: true

class Roda
  module RodaPlugins
    module Streamlined
      module CheckForStreamlined
        def self.===(other)
          other.is_a?(Proc) && other.respond_to?(:touched) && other.touched
        end
      end

      module InstanceMethods
        include ::Streamlined::Helpers
      end

      def self.load_dependencies(app, _opts = OPTS)
        app.plugin :custom_block_results
      end

      def self.configure(app, _opts = OPTS)
        app.handle_block_result CheckForStreamlined, &:to_s
      end
    end

    register_plugin :streamlined, Streamlined
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
streamlined-0.6.0 lib/roda/plugins/streamlined.rb
streamlined-0.5.2 lib/roda/plugins/streamlined.rb
streamlined-0.5.1 lib/roda/plugins/streamlined.rb
streamlined-0.5.0 lib/roda/plugins/streamlined.rb
streamlined-0.4.0 lib/roda/plugins/streamlined.rb