Class: GetText::Tools::Task
- Inherits:
-
Object
- Object
- GetText::Tools::Task
- Includes:
- GetText, Rake::DSL
- Defined in:
- lib/gettext/tools/task.rb
Constant Summary
Constants included from GetText
Instance Attribute Summary collapse
-
#domain ⇒ Object
Returns the value of attribute domain.
-
#files ⇒ Object
Returns the value of attribute files.
-
#locales ⇒ Object
Returns the value of attribute locales.
-
#mo_base_directory ⇒ Object
Returns the value of attribute mo_base_directory.
-
#namespace_prefix ⇒ Object
Returns the value of attribute namespace_prefix.
-
#po_base_directory ⇒ Object
Returns the value of attribute po_base_directory.
-
#xgettext_options ⇒ Array<String>
readonly
Command line options for extracting messages from sources.
Instance Method Summary collapse
-
#initialize(spec) {|_self| ... } ⇒ Task
constructor
A new instance of Task.
Methods included from GetText
#N_, #Nn_, #bindtextdomain, #bindtextdomain_to, #cgi, #cgi=, #gettext, included, #locale, #ngettext, #npgettext, #nsgettext, #output_charset, #pgettext, #set_cgi, #set_current_locale, #set_locale, #set_output_charset, #sgettext, #textdomain, #textdomain_to
Constructor Details
#initialize(spec) {|_self| ... } ⇒ Task
Returns a new instance of Task.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/gettext/tools/task.rb', line 36 def initialize(spec) @spec = spec @locales = [] @po_base_directory = "po" @mo_base_directory = "." @files = target_files @domain = @spec.name @namespace_prefix = nil = [] yield(self) if block_given? @locales = detect_locales if @locales.empty? raise("must set locales: #{inspect}") if @locales.empty? define end |
Instance Attribute Details
#domain ⇒ Object
Returns the value of attribute domain.
29 30 31 |
# File 'lib/gettext/tools/task.rb', line 29 def domain @domain end |
#files ⇒ Object
Returns the value of attribute files.
30 31 32 |
# File 'lib/gettext/tools/task.rb', line 30 def files @files end |
#locales ⇒ Object
Returns the value of attribute locales.
29 30 31 |
# File 'lib/gettext/tools/task.rb', line 29 def locales @locales end |
#mo_base_directory ⇒ Object
Returns the value of attribute mo_base_directory.
29 30 31 |
# File 'lib/gettext/tools/task.rb', line 29 def mo_base_directory @mo_base_directory end |
#namespace_prefix ⇒ Object
Returns the value of attribute namespace_prefix.
30 31 32 |
# File 'lib/gettext/tools/task.rb', line 30 def namespace_prefix @namespace_prefix end |
#po_base_directory ⇒ Object
Returns the value of attribute po_base_directory.
29 30 31 |
# File 'lib/gettext/tools/task.rb', line 29 def po_base_directory @po_base_directory end |
#xgettext_options ⇒ Array<String> (readonly)
Returns Command line options for extracting messages from sources.
35 36 37 |
# File 'lib/gettext/tools/task.rb', line 35 def end |