Class: Plushie::State::Container

Inherits:
Data
  • Object
show all
Includes:
Model::Extensions
Defined in:
lib/plushie/state.rb,
sig/plushie/state.rbs

Overview

Immutable state container.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeContainer

Returns a new instance of Container.

Parameters:

  • data: (Hash[Symbol, untyped])
  • revision: (Integer)
  • transaction: (Hash[Symbol, untyped], nil)


8
# File 'sig/plushie/state.rbs', line 8

def initialize: (data: Hash[Symbol, untyped], revision: Integer, transaction: Hash[Symbol, untyped]?) -> void

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



25
26
27
# File 'lib/plushie/state.rb', line 25

def data
  @data
end

#revisionObject (readonly)

Returns the value of attribute revision

Returns:

  • (Object)

    the current value of revision



25
26
27
# File 'lib/plushie/state.rb', line 25

def revision
  @revision
end

#transactionObject (readonly)

Returns the value of attribute transaction

Returns:

  • (Object)

    the current value of transaction



25
26
27
# File 'lib/plushie/state.rb', line 25

def transaction
  @transaction
end

Instance Method Details

#withContainer

Parameters:

  • changes (Object)

Returns:



10
# File 'sig/plushie/state.rbs', line 10

def with: (**untyped changes) -> Container