Class: Textus::Container

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/textus/container.rb

Overview

Single capability record handed to every use case. Replaces the ReadCaps/WriteCaps/HookCaps trio from 0.26.x. Built once per Store (see Store#initialize); Store delegates its readers to this record, so this struct is the single source of truth for the field set.

Instance Method Summary collapse

Constructor Details

#initializeContainer

Returns a new instance of Container.



21
22
23
24
# File 'lib/textus/container.rb', line 21

def initialize(*)
  super
  freeze
end

Instance Method Details

#with(**attrs) ⇒ Object



19
# File 'lib/textus/container.rb', line 19

def with(**attrs) = self.class.new(to_h.merge(attrs))