Method: Syntax.load

Defined in:
lib/syntax.rb

.load(syntax) ⇒ Object

Load the implementation of the requested syntax. If the syntax cannot be found, or if it cannot be loaded for whatever reason, the Default syntax handler will be returned.



22
23
24
25
26
27
28
# File 'lib/syntax.rb', line 22

def load( syntax )
  begin
    require "syntax/lang/#{syntax}"
  rescue LoadError
  end
  SYNTAX[ syntax ].new
end