class Lisp::String
Public Class Methods
new(n = '')
click to toggle source
# File lib/rubylisp/string.rb, line 9 def initialize(n = '') @value = n.to_s end
with_value(n)
click to toggle source
# File lib/rubylisp/string.rb, line 5 def self.with_value(n) self.new(n) end
Public Instance Methods
equal?(other)
click to toggle source
# File lib/rubylisp/string.rb, line 21 def equal?(other) other.string? && self.value == other.value end
print_string()
click to toggle source
# File lib/rubylisp/string.rb, line 37 def print_string "\"#{@value}\"" end
set!(n)
click to toggle source
# File lib/rubylisp/string.rb, line 13 def set!(n) @value = n.to_s end
string?()
click to toggle source
# File lib/rubylisp/string.rb, line 17 def string? true end
to_s()
click to toggle source
# File lib/rubylisp/string.rb, line 29 def to_s @value end
to_sym()
click to toggle source
# File lib/rubylisp/string.rb, line 33 def to_sym @value.to_sym end
type()
click to toggle source
# File lib/rubylisp/string.rb, line 25 def type :string end