Exception: Musa::Series::Serie::Prototyping::PrototypingError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Musa::Series::Serie::Prototyping::PrototypingError
- Defined in:
- lib/musa-dsl/series/base-series.rb
Overview
Error raised when serie is used in wrong state.
Raised when attempting to consume a prototype serie or perform operations on undefined serie.
Common Scenarios
- Calling
next_valueon prototype - Calling
restarton prototype - Using undefined serie
Solution
Call .instance (or .i) to create consumable instance:
proto = S(1, 2, 3)
proto.next_value # => PrototypingError
inst = proto.instance
inst.next_value # => 1
Instance Method Summary collapse
-
#initialize(message = nil) ⇒ PrototypingError
constructor
Creates prototyping error with message.
Constructor Details
#initialize(message = nil) ⇒ PrototypingError
Creates prototyping error with message.
897 898 899 900 |
# File 'lib/musa-dsl/series/base-series.rb', line 897 def initialize( = nil) ||= 'This serie is a prototype serie: cannot be consumed. To consume the serie use an instance serie via .instance method' super end |