class Nydp::Builtin::TypeOf

Public Instance Methods

builtin_call(arg) click to toggle source
# File lib/nydp/builtin/type_of.rb, line 4
def builtin_call arg
  if arg == nil
    nil
  elsif arg.respond_to?(:nydp_type)
    arg.nydp_type.to_sym
  elsif arg.is_a? Numeric
    :number
  else
    "ruby/#{arg.class.name}".to_sym
  end
end