Sha256: 8083f71018293e01379e65fce41db7a3c5ca4dd4e6881d328555924f12f3f1a2

Contents?: true

Size: 412 Bytes

Versions: 3

Compression:

Stored size: 412 Bytes

Contents

# frozen_string_literal: true

require 'securerandom'

module KManager
  module Resources
    # A memory resource represents content that is generated programmatically and just stored in memory.
    class MemResource < KManager::Resources::BaseResource
      def initialize(**opts)
        fake_uri = URI.parse("mem://#{SecureRandom.alphanumeric(4)}")
        super(fake_uri, **opts)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
k_manager-0.0.37 lib/k_manager/resources/mem_resource.rb
k_manager-0.0.36 lib/k_manager/resources/mem_resource.rb
k_manager-0.0.35 lib/k_manager/resources/mem_resource.rb