Class: Rucas::Symbolic::ConstExpr
- Inherits:
-
Struct
- Object
- Struct
- Rucas::Symbolic::ConstExpr
show all
- Includes:
- Expr
- Defined in:
- lib/rucas/symbolic.rb,
lib/rucas/rewrite.rb,
lib/rucas/symbolic.rb
Overview
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Expr
#children, make, #precedence, #rewrite, #simplify, #to_s_paren
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value
46
47
48
|
# File 'lib/rucas/symbolic.rb', line 46
def value
@value
end
|
Instance Method Details
#constant? ⇒ Boolean
51
|
# File 'lib/rucas/symbolic.rb', line 51
def constant?; true end
|
#match(expr, bindings = {}) ⇒ Object
90
91
92
93
|
# File 'lib/rucas/rewrite.rb', line 90
def match expr, bindings = {}
return bindings if self == expr
return nil
end
|
#to_s ⇒ Object
50
|
# File 'lib/rucas/symbolic.rb', line 50
def to_s; value.to_s end
|
#with(bindings) ⇒ Object
95
96
97
|
# File 'lib/rucas/rewrite.rb', line 95
def with bindings
self
end
|