Class: Plushie::RendererExit

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, message:, details: nil) ⇒ RendererExit

Returns a new instance of RendererExit.



31
32
33
34
35
36
37
38
39
# File 'lib/plushie/renderer_exit.rb', line 31

def initialize(type:, message:, details: nil)
  unless RENDERER_EXIT_TYPES.include?(type)
    raise ArgumentError,
      "invalid RendererExit type #{type.inspect}, " \
      "expected one of #{RENDERER_EXIT_TYPES.map(&:inspect).join(", ")}"
  end

  super
end

Instance Attribute Details

#detailsObject (readonly)

Returns the value of attribute details

Returns:

  • (Object)

    the current value of details



30
31
32
# File 'lib/plushie/renderer_exit.rb', line 30

def details
  @details
end

#messageObject (readonly)

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



30
31
32
# File 'lib/plushie/renderer_exit.rb', line 30

def message
  @message
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



30
31
32
# File 'lib/plushie/renderer_exit.rb', line 30

def type
  @type
end