Method: Concurrent::AtomicFixnum#value=

Defined in:
lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb

#value=(value) ⇒ Fixnum

Explicitly sets the value.

Parameters:

  • value (Fixnum)

    the new value to be set

Returns:

  • (Fixnum)

    the current value

Raises:

  • (ArgumentError)

    if the new value is not a ‘Fixnum`



135
136
137
138
139
140
141
142
# File 'lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb', line 135

class AtomicFixnum < AtomicFixnumImplementation
  # @return [String] Short string representation.
  def to_s
    format '%s value:%s>', super[0..-2], value
  end

  alias_method :inspect, :to_s
end