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

Version Path
asproject-0.1.21 templates/asproject/config/project/config/asclass_config.rb
asproject-0.1.29 templates/asproject/config/project/config/asclass_config.rb
asproject-0.1.118 templates/asproject/config/project/config/asclass_config.rb
asproject-0.1.27 templates/asproject/config/project/config/asclass_config.rb
asproject-0.1.28 templates/asproject/config/project/config/asclass_config.rb
asproject-0.1.30 templates/asproject/config/project/config/asclass_config.rb
asproject-0.1.31 templates/asproject/config/project/config/asclass_config.rb
asproject-0.1.34 templates/asproject/config/project/config/asclass_config.rb
asproject-0.1.32 templates/asproject/config/project/config/asclass_config.rb
asproject-0.1.36 templates/asproject/config/project/config/asclass_config.rb
asproject-0.1.35 templates/asproject/config/project/config/asclass_config.rb
asproject-0.1.33 templates/asproject/config/project/config/asclass_config.rb
asproject-0.1.37 templates/asproject/config/project/config/asclass_config.rb
asproject-0.1.41 templates/asproject/config/project/config/asclass_config.rb
asproject-0.1.44 templates/asproject/config/project/config/asclass_config.rb
asproject-0.1.38 templates/asproject/config/project/config/asclass_config.rb
asproject-0.1.43 templates/asproject/config/project/config/asclass_config.rb
asproject-0.1.40 templates/asproject/config/project/config/asclass_config.rb
asproject-0.1.42 templates/asproject/config/project/config/asclass_config.rb
asproject-0.1.68 templates/asproject/config/project/config/asclass_config.rb