Exception: Servactory::Exceptions::Output

Inherits:
Base
  • Object
show all
Defined in:
lib/servactory/exceptions/output.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context:, message:, output_name: nil, meta: nil) ⇒ Output

Returns a new instance of Output.



11
12
13
14
15
16
17
18
19
# File 'lib/servactory/exceptions/output.rb', line 11

def initialize(context:, message:, output_name: nil, meta: nil)
  @context = context
  @service = context.send(:servactory_service_info)
  @message = message
  @output_name = output_name&.to_sym
  @meta = meta

  super(message)
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



6
7
8
# File 'lib/servactory/exceptions/output.rb', line 6

def message
  @message
end

#metaObject (readonly)

Returns the value of attribute meta.



6
7
8
# File 'lib/servactory/exceptions/output.rb', line 6

def meta
  @meta
end

#output_nameObject (readonly)

Returns the value of attribute output_name.



6
7
8
# File 'lib/servactory/exceptions/output.rb', line 6

def output_name
  @output_name
end

#serviceObject (readonly)

Returns the value of attribute service.



6
7
8
# File 'lib/servactory/exceptions/output.rb', line 6

def service
  @service
end