Sha256: ece2a9cd316fe2a208c2f80d7297cc85f34fefdf08cd3d9e9f88119d4f9aead7
Contents?: true
Size: 1.42 KB
Versions: 29
Compression:
Stored size: 1.42 KB
Contents
# This module will be included in your # TemplateResolver and the initialize_config # method will be called. # # You can add arbitrary Ruby method and member # variables, then access them from your custom # templates. module Config # @method initialize_config # This method will be called from the Project # class that loads it. Initialize any member # variables that you need for your Templates # inside of this method # # For example, if you define a member variable: # # def initialize_config # @variable_name = 'foo_bar' # end # # This variable can be accessed from a template # as follows: # # <%= @variable_name %> # # If you define a new method in this module like: # # def my_method # return 'hello_world' # end # # You can access this method from your template # with: # # <%= my_method %> def initialize_config end # If you want asclass to use templates from a # different folder name, return it here # as the first item of an array, for example: # # return ['as2'] # # Or you can create a new template directory # in this folder, at: # # [Project]/config/templates/asclass/[TEMPLATE_NAME] # and then return that folder name in this method... # You should check the contents of as2 or as3 # because you will need files of the same name... # def default_templates return super end end
Version data entries
29 entries across 29 versions & 1 rubygems