Class: Phony::NationalSplitters::Default
- Defined in:
- lib/phony/national_splitters/default.rb
Overview
TODO Default = Fixed.new(…)?
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
-
#length ⇒ Object
A valid length (at least 3).
-
#plausible?(rest, size, hints = {}) ⇒ Boolean
By default, the national part of a number is always plausible.
-
#split(national_number) ⇒ Array<String>
“Splits” the national part of a phone number into a single piece.
Methods inherited from DSL
Class Method Details
.instance_for ⇒ Object
9 10 11 |
# File 'lib/phony/national_splitters/default.rb', line 9 def self.instance_for @instance ||= new end |
Instance Method Details
#length ⇒ Object
A valid length (at least 3).
43 44 45 |
# File 'lib/phony/national_splitters/default.rb', line 43 def length 3 end |
#plausible?(rest, size, hints = {}) ⇒ Boolean
By default, the national part of a number is always plausible.
37 38 39 |
# File 'lib/phony/national_splitters/default.rb', line 37 def plausible? rest, size, hints = {} true end |
#split(national_number) ⇒ Array<String>
“Splits” the national part of a phone number into a single piece.
22 23 24 |
# File 'lib/phony/national_splitters/default.rb', line 22 def split national_number [nil, national_number] end |