Class: KManager::Resources::MemResource

Inherits:
BaseResource show all
Defined in:
lib/k_manager/resources/mem_resource.rb

Overview

A memory resource represents content that is generated programmatically and just stored in memory.

Constant Summary

Constants inherited from BaseResource

BaseResource::ACTIONS

Instance Attribute Summary

Attributes inherited from BaseResource

#area, #content, #content_type, #documents, #namespace, #status, #uri

Instance Method Summary collapse

Methods inherited from BaseResource

#activated?, #alive?, #attach_document, #attribute_values, #content_loaded?, #debug, #default_content_type, #default_scheme, #documents_loaded?, #documents_preloaded?, #documents_registered?, #fire_action, #fire_next_action, #host, #infer_content_type, #infer_key, #load_content, #load_document, #new_document, #preload_document, #register_document, #scheme, #source_path, valid_action?

Constructor Details

#initialize(**opts) ⇒ MemResource

Returns a new instance of MemResource.



9
10
11
12
# File 'lib/k_manager/resources/mem_resource.rb', line 9

def initialize(**opts)
  fake_uri = URI.parse("mem://#{SecureRandom.alphanumeric(4)}")
  super(fake_uri, **opts)
end