Class: Phony::NationalSplitters::Default

Inherits:
DSL
  • Object
show all
Defined in:
lib/phony/national_splitters/default.rb

Overview

TODO Default = Fixed.new(…)?

Direct Known Subclasses

None

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DSL

#>>, #country_for, #reserved

Class Method Details

.instance_forObject


9
10
11
# File 'lib/phony/national_splitters/default.rb', line 9

def self.instance_for
  @instance ||= new
end

Instance Method Details

#lengthObject

A valid length (at least 3).


23
24
25
# File 'lib/phony/national_splitters/default.rb', line 23

def length
  3
end

#plausible?(rest, size, hints = {}) ⇒ Boolean

Returns:

  • (Boolean)

17
18
19
# File 'lib/phony/national_splitters/default.rb', line 17

def plausible? rest, size, hints = {}
  true
end

#split(national_number) ⇒ Object


13
14
15
# File 'lib/phony/national_splitters/default.rb', line 13

def split national_number
  [national_number]
end