Class: UniProp::PropertyValueGroup
- Inherits:
-
BasePropertyValueGroup
- Object
- BasePropertyValueGroup
- UniProp::PropertyValueGroup
- Defined in:
- lib/uniprop/value_group.rb
Instance Method Summary collapse
-
#initialize(propfile, props, block_no) ⇒ PropertyValueGroup
constructor
propfile内の特定のプロパティのcodeopintと値の対応を管理するためのオブジェクトを生成.
Methods inherited from BasePropertyValueGroup
#has_property?, #inspect, #properties, #string_value_including_codepoints, #value_including_codepoints
Methods included from ValueGroup
#codepoints, #values_of, #values_to_codepoints
Constructor Details
#initialize(propfile, props, block_no) ⇒ PropertyValueGroup
propfile内の特定のプロパティのcodeopintと値の対応を管理するためのオブジェクトを生成
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/uniprop/value_group.rb', line 146 def initialize(propfile, props, block_no) @propfile = propfile = @propfile.version..(@propfile) if props.class==Array props.each { add_property(_1) } elsif props.class==Property add_property(props) end block_range = .blocks[block_no].range raw_block_content = .raw_blocks[block_no].content codepoint_col_no = .codepoint_column_nos[block_no] value_col_nos = [] properties.each { value_col_nos.concat(.property_column_nos(_1)[block_no]) } add_block_values( propfile.shaped_lines[block_range].to_a, raw_block_content, codepoint_col_no, value_col_nos.uniq.sort ) end |