class Template
Attributes
name[RW]
Public Class Methods
config(name, &block)
click to toggle source
# File lib/aimtp.rb, line 18 def config(name, &block) tp = new block.call(tp) tp.name = name @c_path_arr << name @tp_list << tp tp end
find_by_name(tp_name)
click to toggle source
# File lib/aimtp.rb, line 31 def find_by_name(tp_name) @tp_list.find { |tp| tp.name == tp_name } end
ret_all_module()
click to toggle source
# File lib/aimtp.rb, line 27 def ret_all_module @c_path_arr end
Public Instance Methods
pod(name, options = {})
click to toggle source
# File lib/aimtp.rb, line 45 def pod(name, options = {}) if options == {} $dep_arr.push('"' + name + '"') elsif options.is_a? String $dep_arr.push('"' + name + '"' + ', ' + '"' + options + '"') elsif options.is_a? Hash o_str = options.to_s o_str = o_str.gsub(/[\{\}]/, '') $dep_arr.push('"' + name + '"' + ', ' + o_str) end end
sub(name, path, nRoot = 1)
click to toggle source
# File lib/aimtp.rb, line 36 def sub(name, path, nRoot = 1) $sub_file_path_arr << 'sources/' + name + '/Aimfile' name_arr = name.split('/') mod_name = name_arr[name_arr.length - 1] $sub_pod_hash[mod_name] = path $sub_pod_path_hash[mod_name] = name $sub_need_root_hash[mod_name] = nRoot end