lib/chars/chars.rb in chars-0.2.4 vs lib/chars/chars.rb in chars-0.3.0

- old
+ new

@@ -4,10 +4,15 @@ module Chars # The numeric decimal character set NUMERIC = CharSet['0'..'9'] + # @see NUMERIC + # + # @since 0.3.0 + DIGITS = NUMERIC + # The octal character set OCTAL = CharSet['0'..'7'] # The upper-case hexadecimal character set UPPERCASE_HEXADECIMAL = NUMERIC | CharSet['A'..'F'] @@ -39,12 +44,16 @@ '@', '#', '$', '%', '^', '&', '*', '_', '+', '=', '|', '\\', '<', '>', '/' ] # The space character set - SPACE = CharSet[' ', "\f", "\n", "\r", "\t", "\v"] + # + # @since 0.3.0 + WHITESPACE = CharSet[' ', "\f", "\n", "\r", "\t", "\v"] + SPACE = WHITESPACE + # The set of printable characters (not including spaces) VISIBLE = ALPHA_NUMERIC | CharSet[ '\'', '"', '`', ',', ';', ':', '~', '-', '(', ')', '[', ']', '{', '}', '.', '?', '!', '@', '#', '$', '%', '^', '&', '*', '_', '+', '=', '|', '\\', '<', '>', '/' @@ -73,10 +82,19 @@ def self.numeric NUMERIC end # + # @see numeric + # + # @since 0.3.0 + # + def self.digits + numeric + end + + # # The octal-digit character set. # # @return [CharSet] # The octal-digit character set. # @@ -193,18 +211,29 @@ def self.symbols SYMBOLS end # - # The white-space character set. + # The whitespace character set. # # @return [CharSet] - # The white-space character set. + # The whitespace character set. # # @see SPACE # + # @since 0.3.0 + # + def self.whitespace + WHITESPACE + end + + # + # The whitespace character set. + # + # @see #whitespace + # def self.space - SPACE + whitespace end # # The set of printable characters, not including spaces. #