# File lib/templater/generator.rb, line 470 def initialize(destination_root, options = {}, *args) @destination_root = destination_root @arguments = [] @options = options # Initialize options to their default values. self.class.options.each do |option| @options[option.name] ||= option.options[:default] end args.each_with_index do |arg, n| set_argument(n, arg) end self.class.arguments.each_with_index do |argument, i| # Initialize arguments to their default values. @arguments[i] ||= argument.options[:default] # Check if all arguments are valid. argument.valid?(@arguments[i]) end end