Module: Nanoc::Core::StructuredDataLoader Private
- Defined in:
- lib/nanoc/core/structured_data_loader.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Classes: UnknownLanguageError
Class Method Summary collapse
- .for_extension(ext) ⇒ Object private
- .for_language(language) ⇒ Object private
Class Method Details
.for_extension(ext) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/nanoc/core/structured_data_loader.rb', line 24 def self.for_extension(ext) case ext when '.yaml' YamlLoader when '.toml' TomlLoader else raise UnknownLanguageError.enw(language) end end |
.for_language(language) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/nanoc/core/structured_data_loader.rb', line 13 def self.for_language(language) case language when :yaml YamlLoader when :toml TomlLoader else raise UnknownLanguageError.enw(language) end end |