lib/tanuki_emoji/character.rb in tanuki_emoji-0.4.0 vs lib/tanuki_emoji/character.rb in tanuki_emoji-0.5.0
- old
+ new
@@ -18,21 +18,26 @@
PLAIN_VARIATION_SELECTOR = 0xFE0E
# Zero Width Joiner is used in sequences to indicate they should all be evaluated and displayed as a single thing
ZWJ_TAG = 0x200D
- attr_reader :name, :codepoints, :codepoints_alternates, :alpha_code, :aliases, :description
+ attr_reader :name, :codepoints, :codepoints_alternates, :alpha_code, :aliases, :description, :category
+ attr_accessor :unicode_version
+
# @param [String] name
# @param [String] codepoints
# @param [String] alpha_code
- def initialize(name, codepoints:, alpha_code:, description:)
+ # @param [String] description
+ # @param [String] category
+ def initialize(name, codepoints:, alpha_code:, description:, category:)
@name = self.class.format_name(name)
@codepoints = codepoints
@codepoints_alternates = []
@alpha_code = self.class.format_alpha_code(alpha_code)
@aliases = []
@description = description
+ @category = category
end
# Add alternative codepoints to this character
#
# @param [String] codepoints