Exception: RactorShack::ShareableGuaranteed::NonShareablePassedToConstructorError

Inherits:
NonShareableError
  • Object
show all
Defined in:
lib/ractor_shack/shareable_guaranteed.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argument:, argument_position: nil) ⇒ NonShareablePassedToConstructorError

Returns a new instance of NonShareablePassedToConstructorError.



38
39
40
41
42
43
# File 'lib/ractor_shack/shareable_guaranteed.rb', line 38

def initialize(argument:, argument_position: nil)
  self.argument = argument
  self.argument_position = argument_position

  super("Passed an unshareable argument at position #{argument_position}: #{argument}")
end

Instance Attribute Details

#argumentObject

Returns the value of attribute argument.



36
37
38
# File 'lib/ractor_shack/shareable_guaranteed.rb', line 36

def argument
  @argument
end

#argument_nameObject

Returns the value of attribute argument_name.



36
37
38
# File 'lib/ractor_shack/shareable_guaranteed.rb', line 36

def argument_name
  @argument_name
end

#argument_positionObject

Returns the value of attribute argument_position.



36
37
38
# File 'lib/ractor_shack/shareable_guaranteed.rb', line 36

def argument_position
  @argument_position
end