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.
261 262 263 |
# File 'app/models/concerns/atomic_internal_id.rb', line 261 def initialize(generator) @generator = generator end |
Instance Attribute Details
#generator ⇒ Object (readonly)
Returns the value of attribute generator.
259 260 261 |
# File 'app/models/concerns/atomic_internal_id.rb', line 259 def generator @generator end |
Instance Method Details
#next_value ⇒ Object
265 266 267 |
# File 'app/models/concerns/atomic_internal_id.rb', line 265 def next_value @generator.call end |