Class: FExpr::Evaluator::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/fexpr/base.rb

Overview

Classes

Direct Known Subclasses

NumNode, OpNode

Instance Method Summary collapse

Instance Method Details

#evalObject



31
32
33
# File 'lib/fexpr/base.rb', line 31

def eval
  raise 'Implement eval, stupid!'
end

#to_sObject



25
26
27
# File 'lib/fexpr/base.rb', line 25

def to_s
  to_string 0
end

#to_string(depth) ⇒ Object



28
29
30
# File 'lib/fexpr/base.rb', line 28

def to_string(depth)
  raise 'Implement to_string, stupid!'
end

#x(n) ⇒ Object



34
35
36
# File 'lib/fexpr/base.rb', line 34

def x(n)
  Array.new(n) { |x| '.' }.join(' ') + ' '
end