Class: Relisp::Symbol

Inherits:
Object show all
Defined in:
lib/relisp/type_conversion/programming_types.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_elisp(object) ⇒ Object



101
102
103
104
105
106
107
108
109
110
# File 'lib/relisp/type_conversion/programming_types.rb', line 101

def self.from_elisp(object)
  if object[:string] == 'nil'
    nil
  elsif object[:string] == 't'
    true
  else
#        object[:string].gsub('-', '_').to_sym
    object[:string].to_sym
  end
end

Instance Method Details

#to_elispObject



112
113
114
115
# File 'lib/relisp/type_conversion/programming_types.rb', line 112

def to_elisp
#      "'" + self.to_s.gsub('_', '-')
  "'" + self.to_s
end

#valueObject



117
118
119
# File 'lib/relisp/type_conversion/programming_types.rb', line 117

def value
  VariableValue.new(self)
end