Class: SeeingIsBelieving::ExpressionList::PendingExpression
- Inherits:
-
Struct
- Object
- Struct
- SeeingIsBelieving::ExpressionList::PendingExpression
- Defined in:
- lib/seeing_is_believing/expression_list.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#expression ⇒ Object
Returns the value of attribute expression.
Instance Method Summary collapse
-
#inspect(debug = false) ⇒ Object
coloured debug because there’s so much syntax that I get lost trying to parse the output.
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children
8 9 10 |
# File 'lib/seeing_is_believing/expression_list.rb', line 8 def children @children end |
#expression ⇒ Object
Returns the value of attribute expression
8 9 10 |
# File 'lib/seeing_is_believing/expression_list.rb', line 8 def expression @expression end |
Instance Method Details
#inspect(debug = false) ⇒ Object
coloured debug because there’s so much syntax that I get lost trying to parse the output
10 11 12 13 14 15 |
# File 'lib/seeing_is_believing/expression_list.rb', line 10 def inspect(debug=false) colour1 = colour2 = lambda { |s| s } colour1 = lambda { |s| "\e[30;46m#{s}\e[0m" } if debug colour2 = lambda { |s| "\e[37;46m#{s}\e[0m" } if debug "#{colour1['PE(']}#{colour2[expression.inspect]}#{colour1[',' ]}#{colour2[children.inspect]}#{colour1[')']}" end |