Holds static data from the Unicode database
Returns the directory in which the data files are stored
# File lib/active_support/multibyte/unicode.rb, line 364
364: def self.dirname
365: File.dirname(__FILE__) + '/../values/'
366: end
# File lib/active_support/multibyte/unicode.rb, line 351
351: def ===(other)
352: detect { |i| i === other } ? true : false
353: end
Loads the Unicode database and returns all the internal objects of UnicodeDatabase.
# File lib/active_support/multibyte/unicode.rb, line 341
341: def load
342: begin
343: @codepoints, @composition_exclusion, @composition_map, @boundary, @cp1252 = File.open(self.class.filename, 'rb') { |f| Marshal.load f.read }
344: rescue Exception => e
345: raise IOError.new("Couldn't load the Unicode tables for UTF8Handler (#{e.message}), ActiveSupport::Multibyte is unusable")
346: end
347:
348: # Redefine the === method so we can write shorter rules for grapheme cluster breaks
349: @boundary.each do |k,_|
350: @boundary[k].instance_eval do
351: def ===(other)
352: detect { |i| i === other } ? true : false
353: end
354: end if @boundary[k].kind_of?(Array)
355: end
356:
357: # define attr_reader methods for the instance variables
358: class << self
359: attr_reader(*ATTRIBUTES)
360: end
361: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.