Exception: Servactory::Exceptions::Input

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context:, message:, input_name: nil, meta: nil) ⇒ Input

Returns a new instance of Input.



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

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

  super(message)
end

Instance Attribute Details

#input_nameObject (readonly)

Returns the value of attribute input_name.



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

def input_name
  @input_name
end

#messageObject (readonly)

Returns the value of attribute message.



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

def message
  @message
end

#metaObject (readonly)

Returns the value of attribute meta.



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

def meta
  @meta
end

#serviceObject (readonly)

Returns the value of attribute service.



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

def service
  @service
end