Class: Flowckerc::SymTable
- Inherits:
-
Object
- Object
- Flowckerc::SymTable
- Defined in:
- lib/flowckerc.rb
Instance Method Summary collapse
- #add(sym, value) ⇒ Object
- #getId(sym) ⇒ Object
-
#initialize ⇒ SymTable
constructor
A new instance of SymTable.
- #isAtom(sym) ⇒ Object
- #isSolution ⇒ Object
- #value(sym) ⇒ Object
Constructor Details
#initialize ⇒ SymTable
Returns a new instance of SymTable.
30 31 32 |
# File 'lib/flowckerc.rb', line 30 def initialize @table = {} end |
Instance Method Details
#add(sym, value) ⇒ Object
34 35 36 |
# File 'lib/flowckerc.rb', line 34 def add sym, value @table[sym] = value end |
#getId(sym) ⇒ Object
38 39 40 |
# File 'lib/flowckerc.rb', line 38 def getId sym @table[sym].id end |
#isAtom(sym) ⇒ Object
46 47 48 |
# File 'lib/flowckerc.rb', line 46 def isAtom sym @table[sym].is_a? Atom end |
#isSolution ⇒ Object
50 51 52 |
# File 'lib/flowckerc.rb', line 50 def isSolution @table[sym].is_a? FormulaSolution end |
#value(sym) ⇒ Object
42 43 44 |
# File 'lib/flowckerc.rb', line 42 def value sym @table[sym] end |