Method: Cog::Config#prepare
- Defined in:
- lib/cog/config.rb
#prepare(opt = {}) ⇒ Object
Must be called once before using cog. In the context of a command-line invocation, this method will be called automatically. Outside of that context, for example in a unit test, it will have to be called manually.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/cog/config.rb', line 61 def prepare(opt={}) throw :ConfigInstanceAlreadyPrepared if @prepared && !opt[:force_reset] @prepared = true @fullpaths = opt[:fullpaths] @project_path = nil @project_generator_path = nil @project_plugin_path = nil @project_template_path = nil @generator_path = [] @plugin_path = [] @template_path = [] @plugins = {} @target_language = Language.new @active_languages = [Language.new] # active language stack @language = {} @language_extension_map = {} process_cogfiles opt post_cogfile_processing build_language_extension_map end |