Method: Wingalingding::Char#initialize

Defined in:
lib/char.rb

#initialize(line) ⇒ Char



18
19
20
21
22
23
24
# File 'lib/char.rb', line 18

def initialize(line)
  @stripped = line.strip.split(/\t/)
  @description = @stripped[1][0..MAX_DESCRIPTION_LENGTH]
  @char = @stripped[0]
  @hex = @stripped[2]
  @code = @description.match(/\(U\+[a-zA-Z0-9]+\)/).to_s
end