Class: AtomicInternalId::Supply

Inherits:
Object
  • Object
show all
Defined in:
app/models/concerns/atomic_internal_id.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(generator) ⇒ Supply

Returns a new instance of Supply.


234
235
236
# File 'app/models/concerns/atomic_internal_id.rb', line 234

def initialize(generator)
  @generator = generator
end

Instance Attribute Details

#generatorObject (readonly)

Returns the value of attribute generator.


232
233
234
# File 'app/models/concerns/atomic_internal_id.rb', line 232

def generator
  @generator
end

Instance Method Details

#next_valueObject


238
239
240
# File 'app/models/concerns/atomic_internal_id.rb', line 238

def next_value
  @generator.call
end