Class: Plushie::Command::Cmd

Inherits:
Data
  • Object
show all
Defined in:
lib/plushie/command.rb,
sig/plushie/command.rbs

Overview

The immutable command data object. All constructors return this.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCmd

Returns a new instance of Cmd.

Parameters:

  • type: (Symbol)
  • payload: (Hash[Symbol, untyped])


7
# File 'sig/plushie/command.rbs', line 7

def initialize: (type: Symbol, payload: Hash[Symbol, untyped]) -> void

Instance Attribute Details

#payloadObject (readonly)

Returns the value of attribute payload

Returns:

  • (Object)

    the current value of payload



43
44
45
# File 'lib/plushie/command.rb', line 43

def payload
  @payload
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



43
44
45
# File 'lib/plushie/command.rb', line 43

def type
  @type
end

Instance Method Details

#withCmd

Parameters:

  • (Object)

Returns:



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

def with: (**untyped) -> Cmd