Method: CSL::Loader#load

Defined in:
lib/csl/loader.rb

#load(input) ⇒ Style, Locale

Note:

The base class is expected to define a #parse! method.

Resolves the passed-in path/name or string and loads the asset data. The data will be passed on to the #parse! method of the base class. Typically, this will return a new instance of the class.

Examples:

Style.load(:apa)                         -> style
Style.load('chicago-author.csl')         -> style
Locale.load('en')                        -> locale
Locale.load('http://example.com/de.xml') -> locale

Returns:

Raises:

  • ParseError



30
31
32
# File 'lib/csl/loader.rb', line 30

def load(input)
  parse! extract_data_from(input)
end