Class: AtomicInternalId::Supply
- Inherits:
-
Object
- Object
- AtomicInternalId::Supply
- Defined in:
- app/models/concerns/atomic_internal_id.rb
Instance Attribute Summary collapse
-
#generator ⇒ Object
readonly
Returns the value of attribute generator.
Instance Method Summary collapse
-
#initialize(generator) ⇒ Supply
constructor
A new instance of Supply.
- #next_value ⇒ Object
Constructor Details
#initialize(generator) ⇒ Supply
Returns a new instance of Supply.
263 264 265 |
# File 'app/models/concerns/atomic_internal_id.rb', line 263 def initialize(generator) @generator = generator end |
Instance Attribute Details
#generator ⇒ Object (readonly)
Returns the value of attribute generator.
261 262 263 |
# File 'app/models/concerns/atomic_internal_id.rb', line 261 def generator @generator end |
Instance Method Details
#next_value ⇒ Object
267 268 269 |
# File 'app/models/concerns/atomic_internal_id.rb', line 267 def next_value @generator.call end |