Class: YARDJS::Handlers::ConstantHandler

Inherits:
Base
  • Object
show all
Defined in:
lib/yard-js/handlers/constant_handler.rb

Instance Method Summary collapse

Methods inherited from Base

#call_params, #caller_method, #clean_comment, #handle_default_comments, handles?, #parse_block, #register_docstring, #register_source

Instance Method Details

#parse_type(type) ⇒ Object



41
42
43
44
45
46
47
# File 'lib/yard-js/handlers/constant_handler.rb', line 41

def parse_type(type)
  case type
  when Node; type.class.to_s[/::([^:]+)$/, 1]
  when FalseClass, TrueClass; 'Boolean'
  when NilClass; 'null'
  end
end