Class: S3Light::ConcurrentResult

Inherits:
Object
  • Object
show all
Defined in:
lib/s3-light/concurrent_result.rb

Instance Method Summary collapse

Constructor Details

#initializeConcurrentResult

Returns a new instance of ConcurrentResult.



5
6
7
# File 'lib/s3-light/concurrent_result.rb', line 5

def initialize
  @hash = Concurrent::Hash.new
end

Instance Method Details

#add(key, value) ⇒ Object



9
10
11
# File 'lib/s3-light/concurrent_result.rb', line 9

def add(key, value)
  @hash[key] = value
end

#inspectObject



17
18
19
# File 'lib/s3-light/concurrent_result.rb', line 17

def inspect
  "#<#{self.class.name} @hash=#{@hash}>"
end

#to_hObject



13
14
15
# File 'lib/s3-light/concurrent_result.rb', line 13

def to_h
  @hash
end