Method: Tocmd::TranslatorTrans#initialize
- Defined in:
- lib/tocmd/translator_trans.rb
#initialize(source_file_path) ⇒ TranslatorTrans
Returns a new instance of TranslatorTrans.
6 7 8 9 10 11 12 13 14 |
# File 'lib/tocmd/translator_trans.rb', line 6 def initialize(source_file_path) #源文件路径 @source_file_path = source_file_path #gem跟目录 @gem_root_path = File.('../', @source_file_path) #editor path @editor_path = Pathname.new(File.('../../../template', __FILE__)).realpath.to_s end |