Method: MathViz::Term.list_terms
- Defined in:
- lib/mathviz.rb
.list_terms(env) ⇒ Object
Return a list of all MathViz::Terms accessible from a binding
258 259 260 261 262 263 264 265 266 267 |
# File 'lib/mathviz.rb', line 258 def self.list_terms(env) eval("local_variables", env).map { |var| value = eval(var.to_s, env) if (value.kind_of?(MathViz::Term)) value else nil end }.compact end |