Class: ICU4X::RakeTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- ICU4X::RakeTask
- Defined in:
- lib/icu4x/rake_task.rb
Overview
Rake task for generating ICU4X data blobs.
Instance Attribute Summary collapse
-
#locales ⇒ Symbol, Array<String>
Locale specifier or array of locale strings Defaults to ‘:recommended`.
-
#markers ⇒ Symbol, Array<String>
Data markers to include Defaults to ‘:all`.
-
#name ⇒ String
readonly
The name of the task.
-
#output ⇒ Pathname, String
Output path relative to Rakefile.
Instance Method Summary collapse
-
#initialize(name = "icu4x:data:generate") {|self| ... } ⇒ RakeTask
constructor
Creates a new RakeTask.
Constructor Details
#initialize(name = "icu4x:data:generate") {|self| ... } ⇒ RakeTask
Creates a new RakeTask.
42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/icu4x/rake_task.rb', line 42 def initialize(name="icu4x:data:generate") super() @name = name @locales = :recommended @markers = :all @output = nil yield self if block_given? raise ArgumentError, "output is required" if @output.nil? define_tasks end |
Instance Attribute Details
#locales ⇒ Symbol, Array<String>
Returns Locale specifier or array of locale strings Defaults to ‘:recommended`.
28 29 30 |
# File 'lib/icu4x/rake_task.rb', line 28 def locales @locales end |
#markers ⇒ Symbol, Array<String>
Returns Data markers to include Defaults to ‘:all`.
32 33 34 |
# File 'lib/icu4x/rake_task.rb', line 32 def markers @markers end |
#name ⇒ String (readonly)
Returns The name of the task.
24 25 26 |
# File 'lib/icu4x/rake_task.rb', line 24 def name @name end |
#output ⇒ Pathname, String
Returns Output path relative to Rakefile.
35 36 37 |
# File 'lib/icu4x/rake_task.rb', line 35 def output @output end |