Class: Z3::Printer::PrintedExpr
- Inherits:
-
Object
- Object
- Z3::Printer::PrintedExpr
- Defined in:
- lib/z3/printer.rb
Instance Attribute Summary collapse
-
#priority ⇒ Object
readonly
Returns the value of attribute priority.
-
#str ⇒ Object
readonly
Returns the value of attribute str.
Instance Method Summary collapse
- #enforce_parentheses ⇒ Object
-
#initialize(str, priority = false) ⇒ PrintedExpr
constructor
A new instance of PrintedExpr.
- #to_s ⇒ Object
Constructor Details
#initialize(str, priority = false) ⇒ PrintedExpr
Returns a new instance of PrintedExpr.
11 12 13 14 |
# File 'lib/z3/printer.rb', line 11 def initialize(str, priority=false) @str = str @priority = priority end |
Instance Attribute Details
#priority ⇒ Object (readonly)
Returns the value of attribute priority.
10 11 12 |
# File 'lib/z3/printer.rb', line 10 def priority @priority end |
#str ⇒ Object (readonly)
Returns the value of attribute str.
10 11 12 |
# File 'lib/z3/printer.rb', line 10 def str @str end |
Instance Method Details
#enforce_parentheses ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/z3/printer.rb', line 18 def enforce_parentheses if @priority "(#{@str})" else @str end end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/z3/printer.rb', line 15 def to_s @str end |