Class: L43Rmap::Runtime::LineTime
- Inherits:
-
Object
- Object
- L43Rmap::Runtime::LineTime
- Defined in:
- lib/l43_rmap/runtime/line_time.rb
Constant Summary collapse
Instance Attribute Summary collapse
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#lnb ⇒ Object
readonly
Returns the value of attribute lnb.
-
#rand ⇒ Object
readonly
Returns the value of attribute rand.
-
#runtime ⇒ Object
readonly
Returns the value of attribute runtime.
-
#terminated ⇒ Object
readonly
Returns the value of attribute terminated.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
Instance Attribute Details
#line ⇒ Object (readonly)
Returns the value of attribute line.
13 14 15 |
# File 'lib/l43_rmap/runtime/line_time.rb', line 13 def line @line end |
#lnb ⇒ Object (readonly)
Returns the value of attribute lnb.
13 14 15 |
# File 'lib/l43_rmap/runtime/line_time.rb', line 13 def lnb @lnb end |
#rand ⇒ Object (readonly)
Returns the value of attribute rand.
13 14 15 |
# File 'lib/l43_rmap/runtime/line_time.rb', line 13 def rand @rand end |
#runtime ⇒ Object (readonly)
Returns the value of attribute runtime.
13 14 15 |
# File 'lib/l43_rmap/runtime/line_time.rb', line 13 def runtime @runtime end |
#terminated ⇒ Object (readonly)
Returns the value of attribute terminated.
13 14 15 |
# File 'lib/l43_rmap/runtime/line_time.rb', line 13 def terminated @terminated end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
13 14 15 |
# File 'lib/l43_rmap/runtime/line_time.rb', line 13 def time @time end |
Instance Method Details
#fields ⇒ Object
35 |
# File 'lib/l43_rmap/runtime/line_time.rb', line 35 def fields = @__fields__ ||= line.split |
#outstack ⇒ Object
37 |
# File 'lib/l43_rmap/runtime/line_time.rb', line 37 def outstack = @__outstack__ ||= [] |
#run ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/l43_rmap/runtime/line_time.rb', line 15 def run chunks = runtime.chunks # p(chunks: chunks.map(&:show)) loop do case chunks in [] return outstack.compact in [chunk, *chunks] result = chunk.(self) # p(result:) case result when Symbol return result else outstack.push(result) end end end end |
#terminate! ⇒ Object
39 |
# File 'lib/l43_rmap/runtime/line_time.rb', line 39 def terminate! = @terminated=true |