Class: Unicoder::Builder::Blocks
- Inherits:
-
Object
- Object
- Unicoder::Builder::Blocks
show all
- Includes:
- Unicoder::Builder
- Defined in:
- lib/unicoder/builders/blocks.rb
Instance Attribute Summary
#formats, #index, #option
Instance Method Summary
collapse
#assign, #assign_codepoint, build, #export, #initialize, #meta, #parse_file
Instance Method Details
#initialize_index ⇒ Object
6
7
8
|
# File 'lib/unicoder/builders/blocks.rb', line 6
def initialize_index
@index = []
end
|
#parse! ⇒ Object
10
11
12
13
14
|
# File 'lib/unicoder/builders/blocks.rb', line 10
def parse!
parse_file :blocks, :line, regex: /^(?<from>\S+?)\.\.(?<to>\S+);\s(?<name>.+)$/ do |line|
@index << [line["from"].to_i(16), line["to"].to_i(16), line["name"]]
end
end
|