Class: Plushie::Event::CommandError

Inherits:
Data
  • Object
show all
Defined in:
lib/plushie/event.rb

Overview

Renderer error for a command.

Emitted when the renderer cannot deliver or execute a command.

Examples:

in Event::CommandError[family:, id:, message:]
  logger.warn("command #{family} failed on #{id}: #{message}")

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reason:, id: nil, family: nil, widget_type: nil, message: nil) ⇒ CommandError

Returns a new instance of CommandError.



311
312
313
# File 'lib/plushie/event.rb', line 311

def initialize(reason:, id: nil, family: nil, widget_type: nil, message: nil)
  super
end

Instance Attribute Details

#familyObject (readonly)

Returns the value of attribute family

Returns:

  • (Object)

    the current value of family



310
311
312
# File 'lib/plushie/event.rb', line 310

def family
  @family
end

#family [String, nil] command family name([String, nil]) ⇒ Object (readonly)

Renderer error for a command.

Emitted when the renderer cannot deliver or execute a command.

Examples:

in Event::CommandError[family:, id:, message:]
  logger.warn("command #{family} failed on #{id}: #{message}")


310
311
312
313
314
# File 'lib/plushie/event.rb', line 310

CommandError = Data.define(:reason, :id, :family, :widget_type, :message) do
  def initialize(reason:, id: nil, family: nil, widget_type: nil, message: nil)
    super
  end
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



310
311
312
# File 'lib/plushie/event.rb', line 310

def id
  @id
end

#id [String, nil] target widget ID([String, nil]) ⇒ Object (readonly)

Renderer error for a command.

Emitted when the renderer cannot deliver or execute a command.

Examples:

in Event::CommandError[family:, id:, message:]
  logger.warn("command #{family} failed on #{id}: #{message}")


310
311
312
313
314
# File 'lib/plushie/event.rb', line 310

CommandError = Data.define(:reason, :id, :family, :widget_type, :message) do
  def initialize(reason:, id: nil, family: nil, widget_type: nil, message: nil)
    super
  end
end

#messageObject (readonly)

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



310
311
312
# File 'lib/plushie/event.rb', line 310

def message
  @message
end

#message [String, nil] human-readable error text([String, nil]) ⇒ Object (readonly)

Renderer error for a command.

Emitted when the renderer cannot deliver or execute a command.

Examples:

in Event::CommandError[family:, id:, message:]
  logger.warn("command #{family} failed on #{id}: #{message}")


310
311
312
313
314
# File 'lib/plushie/event.rb', line 310

CommandError = Data.define(:reason, :id, :family, :widget_type, :message) do
  def initialize(reason:, id: nil, family: nil, widget_type: nil, message: nil)
    super
  end
end

#reasonObject (readonly)

Returns the value of attribute reason

Returns:

  • (Object)

    the current value of reason



310
311
312
# File 'lib/plushie/event.rb', line 310

def reason
  @reason
end

#reason [String] machine-readable error reason([String]) ⇒ Object (readonly)

Renderer error for a command.

Emitted when the renderer cannot deliver or execute a command.

Examples:

in Event::CommandError[family:, id:, message:]
  logger.warn("command #{family} failed on #{id}: #{message}")


310
311
312
313
314
# File 'lib/plushie/event.rb', line 310

CommandError = Data.define(:reason, :id, :family, :widget_type, :message) do
  def initialize(reason:, id: nil, family: nil, widget_type: nil, message: nil)
    super
  end
end

#widget_typeObject (readonly)

Returns the value of attribute widget_type

Returns:

  • (Object)

    the current value of widget_type



310
311
312
# File 'lib/plushie/event.rb', line 310

def widget_type
  @widget_type
end

#widget_type [String, nil] widget type name([String, nil]) ⇒ Object (readonly)

Renderer error for a command.

Emitted when the renderer cannot deliver or execute a command.

Examples:

in Event::CommandError[family:, id:, message:]
  logger.warn("command #{family} failed on #{id}: #{message}")


310
311
312
313
314
# File 'lib/plushie/event.rb', line 310

CommandError = Data.define(:reason, :id, :family, :widget_type, :message) do
  def initialize(reason:, id: nil, family: nil, widget_type: nil, message: nil)
    super
  end
end