Class: PolishCellNumber::Checker
- Inherits:
-
Object
- Object
- PolishCellNumber::Checker
- Defined in:
- lib/polish_cell_number_checker.rb
Instance Method Summary collapse
- #cell_number? ⇒ Boolean
-
#initialize(phone_no) ⇒ Checker
constructor
A new instance of Checker.
- #operator_name ⇒ Object
Constructor Details
#initialize(phone_no) ⇒ Checker
Returns a new instance of Checker.
6 7 8 9 10 11 12 13 14 |
# File 'lib/polish_cell_number_checker.rb', line 6 def initialize(phone_no) @phone_no = phone_no.clone @phone_no.gsub!(/\D/, '') @phone_no.gsub!(/^48/, '') load_data check_number end |
Instance Method Details
#cell_number? ⇒ Boolean
16 17 18 |
# File 'lib/polish_cell_number_checker.rb', line 16 def cell_number? !@found.empty? end |
#operator_name ⇒ Object
20 21 22 |
# File 'lib/polish_cell_number_checker.rb', line 20 def operator_name @found.keys.first unless @found.empty? end |