shorten code

This commit is contained in:
Torsten Ruger 2015-06-14 00:05:10 +03:00
parent db13ccbe41
commit aebbe17252
1 changed files with 2 additions and 6 deletions

View File

@ -1,12 +1,8 @@
module Sof
module Util
def is_value? o
return true if o == true
return true if o == false
return true if o == nil
return true if o.class == Fixnum
return true if o.class == Symbol
return true if o.class == String
return true if [true , false , nil].include?(o)
return true if [Fixnum, Symbol, String].include?(o.class)
if o.respond_to? :is_value?
return true if o.is_value?
end