lib/phonelib/core.rb in phonelib-0.5.0 vs lib/phonelib/core.rb in phonelib-0.5.1

- old
+ new

@@ -36,10 +36,23 @@ # setter method for default_country variable def default_country=(country) @@default_country = country end + # flag identifies whether to use special phone types, like short code + @@parse_special = false + + # getter for flag for special phone types parsing + def parse_special + @@parse_special + end + + # setter for flag for special phone types parsing + def parse_special=(special) + @@parse_special = special + end + # gem constants definition # Main data file FILE_MAIN_DATA = 'data/phone_data.dat' # Extended data file @@ -116,9 +129,11 @@ LEADING_DIGITS = :leading_digits # International prefix key INTERNATIONAL_PREFIX = :international_prefix # Main country for code key MAIN_COUNTRY_FOR_CODE = :main_country_for_code + # Double country prefix flag key + DOUBLE_COUNTRY_PREFIX_FLAG = :double_prefix # Types key TYPES = :types # Formats key FORMATS = :formats # Pattern key