Class: Lisp::Binding
Instance Attribute Summary collapse
-
#symbol ⇒ Object
Returns the value of attribute symbol.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(symbol, value) ⇒ Binding
constructor
A new instance of Binding.
- #to_s ⇒ Object
Constructor Details
#initialize(symbol, value) ⇒ Binding
Returns a new instance of Binding.
6 7 8 9 10 |
# File 'lib/rubylisp/binding.rb', line 6 def initialize(symbol, value) @symbol = symbol @value = value self end |
Instance Attribute Details
#symbol ⇒ Object
Returns the value of attribute symbol.
4 5 6 |
# File 'lib/rubylisp/binding.rb', line 4 def symbol @symbol end |
#value ⇒ Object
Returns the value of attribute value.
4 5 6 |
# File 'lib/rubylisp/binding.rb', line 4 def value @value end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/rubylisp/binding.rb', line 12 def to_s "#{symbol.name} -> #{value.to_s}" end |