object may define itself as value

by defining is_value and returning true
but then it must also define to_sof
This commit is contained in:
Torsten Ruger
2015-05-15 20:59:02 +03:00
parent b359bdd747
commit c48b7a3403
2 changed files with 109 additions and 0 deletions

View File

@ -7,6 +7,9 @@ module Sof
return true if o.class == Fixnum
return true if o.class == Symbol
return true if o.class == String
if o.respond_to? :is_value?
return true if o.is_value?
end
return false
end