lib/packnga/document-task.rb in packnga-0.9.5 vs lib/packnga/document-task.rb in packnga-0.9.6
- old
+ new
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2011 Haruka Yoshihara <yoshihara@clear-code.com>
+# Copyright (C) 2011-2012 Haruka Yoshihara <yoshihara@clear-code.com>
# Copyright (C) 2011 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License version 2.1 as published by the Free Software Foundation.
@@ -43,9 +43,23 @@
# @param [String] dir base direcory path
def base_dir=(dir)
dir = Pathname.new(dir)
@yard_task.base_dir = dir
@reference_task.base_dir = dir
+ end
+
+ # Sets original language which you wrote document.
+ # Default value is your current locale (Locale.current.to_s).
+ # @param [String] language language you wrote document
+ def original_language=(language)
+ @reference_task.original_language = language
+ end
+
+ # Sets translate languages for document.
+ # @param [String] languages languages to translate
+ def translate_languages=(languages)
+ languages = [languages] if languages.instance_of?(String)
+ @reference_task.translate_languages = languages
end
# Runs block to task for YARD documentation.
def yard
yield(@yard_task)