Class: GeolexicaServer::Generator::Base
- Inherits:
-
Object
- Object
- GeolexicaServer::Generator::Base
- Defined in:
- lib/geolexica_server/generator/base.rb
Overview
Base class for generators in GeolexicaServer
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(options = {}) ⇒ Base
Returns a new instance of Base.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/geolexica_server/generator/base.rb', line 13 def initialize( = {}) config_file_path = ["config_file_path"] || GeolexicaServer::DEFAULT_CONFIG_FILE_PATH @config = YAML.load_file(config_file_path) unless @config["geolexica"] && @config["geolexica"]["glossary_path"] raise StandardError, "geolexica.glossary_path is missing in config file." end @glossary_path = @config["geolexica"]["glossary_path"] end |
Class Method Details
.generate(*args) ⇒ Object
9 10 11 |
# File 'lib/geolexica_server/generator/base.rb', line 9 def self.generate(*args) new(*args).generate end |