Class: Docks::SymbolSources::JQuery

Inherits:
Base
  • Object
show all
Defined in:
lib/docks/symbol_sources/jquery_symbol_source.rb

Instance Method Summary collapse

Instance Method Details

#path_for(symbol) ⇒ Object



14
# File 'lib/docks/symbol_sources/jquery_symbol_source.rb', line 14

def path_for(symbol); "http://api.jquery.com/" end

#recognizes?(symbol, options = {}) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
10
11
12
# File 'lib/docks/symbol_sources/jquery_symbol_source.rb', line 7

def recognizes?(symbol, options = {})
  language = options.fetch(:language, nil)
  return false if language && Languages.file_type(language) != Types::Languages::SCRIPT

  symbol.downcase == "jquery"
end