Sha256: 2c6409a8b3a47eb414eade1781e99b15d1c676beee43af1230753e58b839bac0

Contents?: true

Size: 881 Bytes

Versions: 2

Compression:

Stored size: 881 Bytes

Contents

# frozen_string_literal: true

require "dry/inflector"

module Dry
  class View
    # @api private
    class RenderEnvironmentMissing
      class MissingEnvironmentError < StandardError
        def message
          "a +render_env+ must be provided"
        end
      end

      def format
        raise MissingEnvironmentError
      end

      def context
        raise MissingEnvironmentError
      end

      def part(_name, _value, **_options)
        raise MissingEnvironmentError
      end

      def scope(_name = nil, _locals) # rubocop:disable Style/OptionalArguments
        raise MissingEnvironmentError
      end

      def template(_name, _scope)
        raise MissingEnvironmentError
      end

      def partial(_name, _scope)
        raise MissingEnvironmentError
      end

      def inflector
        @inflector ||= Dry::Inflector.new
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dry-view-0.8.0 lib/dry/view/render_environment_missing.rb
dry-view-0.7.1 lib/dry/view/render_environment_missing.rb