Sha256: 1cd853e378dbd5998f8d705470bd902ece893073d460d505d5a276225ba76713

Contents?: true

Size: 399 Bytes

Versions: 25

Compression:

Stored size: 399 Bytes

Contents

# frozen_string_literal: true

module PlatformosCheck
  module LanguageServer
    module TypeHelper
      def input_type_of(literal)
        case literal
        when String
          'string'
        when Numeric
          'number'
        when TrueClass, FalseClass
          'boolean'
        when NilClass
          'nil'
        else
          'untyped'
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
platformos-check-0.4.14 lib/platformos_check/language_server/type_helper.rb
platformos-check-0.4.13 lib/platformos_check/language_server/type_helper.rb
platformos-check-0.4.12 lib/platformos_check/language_server/type_helper.rb
platformos-check-0.4.11 lib/platformos_check/language_server/type_helper.rb
platformos-check-0.4.10 lib/platformos_check/language_server/type_helper.rb
platformos-check-0.4.9 lib/platformos_check/language_server/type_helper.rb
platformos-check-0.4.8 lib/platformos_check/language_server/type_helper.rb
platformos-check-0.4.7 lib/platformos_check/language_server/type_helper.rb
platformos-check-0.4.6 lib/platformos_check/language_server/type_helper.rb
platformos-check-0.4.5 lib/platformos_check/language_server/type_helper.rb
platformos-check-0.4.4 lib/platformos_check/language_server/type_helper.rb
platformos-check-0.4.3 lib/platformos_check/language_server/type_helper.rb
platformos-check-0.4.2 lib/platformos_check/language_server/type_helper.rb
platformos-check-0.4.1 lib/platformos_check/language_server/type_helper.rb
platformos-check-0.4.0 lib/platformos_check/language_server/type_helper.rb
platformos-check-0.3.3 lib/platformos_check/language_server/type_helper.rb
platformos-check-0.3.1 lib/platformos_check/language_server/type_helper.rb
platformos-check-0.3.0 lib/platformos_check/language_server/type_helper.rb
platformos-check-0.2.2 lib/platformos_check/language_server/type_helper.rb
platformos-check-0.2.1 lib/platformos_check/language_server/type_helper.rb