Class: TwitterCldr::Resources::SegmentTestsImporter
- Inherits:
-
UnicodeImporter
- Object
- UnicodeImporter
- TwitterCldr::Resources::SegmentTestsImporter
- Defined in:
- lib/twitter_cldr/resources/segment_tests_importer.rb
Constant Summary collapse
- URL_ROOT =
"ucd/auxiliary"
- TEST_FILES =
[ 'WordBreakTest.txt', 'SentenceBreakTest.txt' ]
Instance Attribute Summary collapse
-
#input_path ⇒ Object
readonly
Returns the value of attribute input_path.
-
#output_path ⇒ Object
readonly
Returns the value of attribute output_path.
Instance Method Summary collapse
- #import ⇒ Object
-
#initialize(input_path, output_path) ⇒ SegmentTestsImporter
constructor
A new instance of SegmentTestsImporter.
Constructor Details
#initialize(input_path, output_path) ⇒ SegmentTestsImporter
Returns a new instance of SegmentTestsImporter.
20 21 22 23 |
# File 'lib/twitter_cldr/resources/segment_tests_importer.rb', line 20 def initialize(input_path, output_path) @input_path = input_path @output_path = output_path end |
Instance Attribute Details
#input_path ⇒ Object (readonly)
Returns the value of attribute input_path.
18 19 20 |
# File 'lib/twitter_cldr/resources/segment_tests_importer.rb', line 18 def input_path @input_path end |
#output_path ⇒ Object (readonly)
Returns the value of attribute output_path.
18 19 20 |
# File 'lib/twitter_cldr/resources/segment_tests_importer.rb', line 18 def output_path @output_path end |
Instance Method Details
#import ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/twitter_cldr/resources/segment_tests_importer.rb', line 25 def import FileUtils.mkdir_p(input_path) FileUtils.mkdir_p(output_path) TEST_FILES.each do |test_file| import_test_file(test_file) end end |