40 lines
664 B
Ruby
40 lines
664 B
Ruby
require_relative "util"
|
|
require_relative "members"
|
|
require_relative "known"
|
|
require_relative "writer"
|
|
require_relative "array"
|
|
require_relative "occurence"
|
|
|
|
Symbol.class_eval do
|
|
def to_sof(io, members)
|
|
io.write ":#{to_s}"
|
|
end
|
|
end
|
|
NilClass.class_eval do
|
|
def to_sof(io,members)
|
|
io.write "nil"
|
|
end
|
|
end
|
|
TrueClass.class_eval do
|
|
def to_sof(io , members)
|
|
io.write "true"
|
|
end
|
|
end
|
|
FalseClass.class_eval do
|
|
def to_sof(io , members)
|
|
io.write "false"
|
|
end
|
|
end
|
|
String.class_eval do
|
|
def to_sof(io, members)
|
|
io.write "'"
|
|
io.write self
|
|
io.write "'"
|
|
end
|
|
end
|
|
Fixnum.class_eval do
|
|
def to_sof(io , members)
|
|
io.write to_s
|
|
end
|
|
end
|