Class: GetText::Task
- Inherits:
-
Object
- Object
- GetText::Task
- Includes:
- GetText, Rake::DSL
- Defined in:
- lib/gettext/task.rb
Constant Summary
Constants included from GetText
BOM_UTF8, MOFile, MoFile, PoParser, VERSION
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.
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=, #create_mofiles, #create_mofiles_org, #gettext, included, #locale, #msgmerge, #ngettext, #npgettext, #nsgettext, #output_charset, #pgettext, #remove_bom, #set_cgi, #set_current_locale, #set_locale, #set_output_charset, #sgettext, #textdomain, #textdomain_to, #update_pofiles, #update_pofiles_org
Constructor Details
#initialize(spec) {|_self| ... } ⇒ Task
Returns a new instance of Task.
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/gettext/task.rb', line 29 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.
27 28 29 |
# File 'lib/gettext/task.rb', line 27 def domain @domain end |
#files ⇒ Object
Returns the value of attribute files.
28 29 30 |
# File 'lib/gettext/task.rb', line 28 def files @files end |
#locales ⇒ Object
Returns the value of attribute locales.
27 28 29 |
# File 'lib/gettext/task.rb', line 27 def locales @locales end |
#mo_base_directory ⇒ Object
Returns the value of attribute mo_base_directory.
27 28 29 |
# File 'lib/gettext/task.rb', line 27 def mo_base_directory @mo_base_directory end |
#namespace_prefix ⇒ Object
Returns the value of attribute namespace_prefix.
28 29 30 |
# File 'lib/gettext/task.rb', line 28 def namespace_prefix @namespace_prefix end |
#po_base_directory ⇒ Object
Returns the value of attribute po_base_directory.
27 28 29 |
# File 'lib/gettext/task.rb', line 27 def po_base_directory @po_base_directory end |