Module: PlatformosCheck::LanguageServer::TypeHelper

Included in:
VariableLookupFinder, VariableLookupFinder::AssignmentsFinder::Scope
Defined in:
lib/platformos_check/language_server/type_helper.rb

Instance Method Summary collapse

Instance Method Details

#input_type_of(literal) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/platformos_check/language_server/type_helper.rb', line 6

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