Class: Speculations::Data
- Inherits:
-
Object
- Object
- Speculations::Data
- Defined in:
- lib/speculations/data.rb
Instance Attribute Summary collapse
-
#ctxt ⇒ Object
readonly
Returns the value of attribute ctxt.
-
#debug ⇒ Object
readonly
Returns the value of attribute debug.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#lnb ⇒ Object
readonly
Returns the value of attribute lnb.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
- #info(label) ⇒ Object
- #up_to_context(new_state = nil) ⇒ Object
- #update(lnb: nil, line: nil, state: nil, node: nil, ctxt: nil) ⇒ Object
Instance Attribute Details
#ctxt ⇒ Object (readonly)
Returns the value of attribute ctxt.
5 6 7 |
# File 'lib/speculations/data.rb', line 5 def ctxt @ctxt end |
#debug ⇒ Object (readonly)
Returns the value of attribute debug.
5 6 7 |
# File 'lib/speculations/data.rb', line 5 def debug @debug end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
5 6 7 |
# File 'lib/speculations/data.rb', line 5 def line @line end |
#lnb ⇒ Object (readonly)
Returns the value of attribute lnb.
5 6 7 |
# File 'lib/speculations/data.rb', line 5 def lnb @lnb end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
5 6 7 |
# File 'lib/speculations/data.rb', line 5 def node @node end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
5 6 7 |
# File 'lib/speculations/data.rb', line 5 def state @state end |
Instance Method Details
#info(label) ⇒ Object
7 |
# File 'lib/speculations/data.rb', line 7 def info(label) = node.info(label) |
#up_to_context(new_state = nil) ⇒ Object
9 |
# File 'lib/speculations/data.rb', line 9 def up_to_context(new_state=nil) = update(state: new_state || ctxt, node: node.parent) |
#update(lnb: nil, line: nil, state: nil, node: nil, ctxt: nil) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/speculations/data.rb', line 11 def update(lnb: nil, line: nil, state: nil, node: nil, ctxt: nil) @ctxt = ctxt if ctxt @debug = debug if debug @line = line if line @lnb = lnb if lnb @node = node if node @state = state if state self end |