Class: GettextColumnMapping::Tasks
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- GettextColumnMapping::Tasks
- Defined in:
- lib/gettext_column_mapping/tasks.rb
Instance Attribute Summary collapse
-
#lib_paths ⇒ Object
Returns the value of attribute lib_paths.
-
#locale_path ⇒ Object
Returns the value of attribute locale_path.
-
#mo_args ⇒ Object
Returns the value of attribute mo_args.
-
#options_finder ⇒ Object
Returns the value of attribute options_finder.
-
#options_store ⇒ Object
Returns the value of attribute options_store.
-
#po_pattern ⇒ Object
Returns the value of attribute po_pattern.
-
#require_files ⇒ Object
Returns the value of attribute require_files.
-
#require_libs ⇒ Object
Returns the value of attribute require_libs.
-
#require_test_libs ⇒ Object
Returns the value of attribute require_test_libs.
-
#test_paths ⇒ Object
Returns the value of attribute test_paths.
-
#text_domain ⇒ Object
Returns the value of attribute text_domain.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(version, domain = nil) {|_self| ... } ⇒ Tasks
constructor
A new instance of Tasks.
- #load_gettext ⇒ Object
- #po_root ⇒ Object
- #verify_variables ⇒ Object
Constructor Details
#initialize(version, domain = nil) {|_self| ... } ⇒ Tasks
Returns a new instance of Tasks.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/gettext_column_mapping/tasks.rb', line 8 def initialize(version, domain = nil, &block) @test_paths = [] @require_libs = [] @require_test_libs = [] @require_files = [] @options_store = {} @po_pattern = nil @options_finder = {} @locale_path = 'locale' @version = version @text_domain = domain yield self if block_given? verify_variables define end |
Instance Attribute Details
#lib_paths ⇒ Object
Returns the value of attribute lib_paths.
5 6 7 |
# File 'lib/gettext_column_mapping/tasks.rb', line 5 def lib_paths @lib_paths end |
#locale_path ⇒ Object
Returns the value of attribute locale_path.
5 6 7 |
# File 'lib/gettext_column_mapping/tasks.rb', line 5 def locale_path @locale_path end |
#mo_args ⇒ Object
Returns the value of attribute mo_args.
5 6 7 |
# File 'lib/gettext_column_mapping/tasks.rb', line 5 def mo_args @mo_args end |
#options_finder ⇒ Object
Returns the value of attribute options_finder.
5 6 7 |
# File 'lib/gettext_column_mapping/tasks.rb', line 5 def @options_finder end |
#options_store ⇒ Object
Returns the value of attribute options_store.
5 6 7 |
# File 'lib/gettext_column_mapping/tasks.rb', line 5 def @options_store end |
#po_pattern ⇒ Object
Returns the value of attribute po_pattern.
5 6 7 |
# File 'lib/gettext_column_mapping/tasks.rb', line 5 def po_pattern @po_pattern end |
#require_files ⇒ Object
Returns the value of attribute require_files.
5 6 7 |
# File 'lib/gettext_column_mapping/tasks.rb', line 5 def require_files @require_files end |
#require_libs ⇒ Object
Returns the value of attribute require_libs.
5 6 7 |
# File 'lib/gettext_column_mapping/tasks.rb', line 5 def require_libs @require_libs end |
#require_test_libs ⇒ Object
Returns the value of attribute require_test_libs.
5 6 7 |
# File 'lib/gettext_column_mapping/tasks.rb', line 5 def require_test_libs @require_test_libs end |
#test_paths ⇒ Object
Returns the value of attribute test_paths.
5 6 7 |
# File 'lib/gettext_column_mapping/tasks.rb', line 5 def test_paths @test_paths end |
#text_domain ⇒ Object
Returns the value of attribute text_domain.
5 6 7 |
# File 'lib/gettext_column_mapping/tasks.rb', line 5 def text_domain @text_domain end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
6 7 8 |
# File 'lib/gettext_column_mapping/tasks.rb', line 6 def version @version end |
Instance Method Details
#load_gettext ⇒ Object
34 35 36 37 |
# File 'lib/gettext_column_mapping/tasks.rb', line 34 def load_gettext require 'gettext' require 'gettext/utils' end |
#po_root ⇒ Object
39 40 41 |
# File 'lib/gettext_column_mapping/tasks.rb', line 39 def po_root [:po_root] || locale_path end |
#verify_variables ⇒ Object
24 25 26 27 28 |
# File 'lib/gettext_column_mapping/tasks.rb', line 24 def verify_variables @options_finder = {:to => File.join(locale_path, 'data.rb')}.merge(@options_finder) @options_store = {:po_root => locale_path}.merge(@options_store) @po_pattern ||= "locale/data.rb" end |