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
8 9 10 |
# File 'lib/phony/national_splitters/default.rb', line 8 def self.instance_for @instance_for ||= new end |
Instance Method Details
#length ⇒ Object
A valid length (at least 3).
42 43 44 |
# File 'lib/phony/national_splitters/default.rb', line 42 def length 3 end |
#plausible?(_rest, _size, _hints = {}) ⇒ Boolean
By default, the national part of a number is always plausible.
36 37 38 |
# File 'lib/phony/national_splitters/default.rb', line 36 def plausible?(_rest, _size, _hints = {}) true end |
#split(national_number) ⇒ Array<String>
“Splits” the national part of a phone number into a single piece.
21 22 23 |
# File 'lib/phony/national_splitters/default.rb', line 21 def split(national_number) [nil, national_number] end |