Class: UKPostcode::AbstractPostcode
- Inherits:
-
Object
- Object
- UKPostcode::AbstractPostcode
show all
- Defined in:
- lib/uk_postcode/abstract_postcode.rb
Constant Summary
collapse
- NotImplemented =
Class.new(StandardError)
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of AbstractPostcode.
9
10
11
|
# File 'lib/uk_postcode/abstract_postcode.rb', line 9
def initialize(*)
raise NotImplemented
end
|
Class Method Details
.parse(_str) ⇒ Object
5
6
7
|
# File 'lib/uk_postcode/abstract_postcode.rb', line 5
def self.parse(_str)
raise NotImplemented
end
|
Instance Method Details
#area ⇒ Object
13
|
# File 'lib/uk_postcode/abstract_postcode.rb', line 13
def area; nil; end
|
#country ⇒ Object
36
37
38
|
# File 'lib/uk_postcode/abstract_postcode.rb', line 36
def country
:unknown
end
|
#district ⇒ Object
14
|
# File 'lib/uk_postcode/abstract_postcode.rb', line 14
def district; nil; end
|
#full? ⇒ Boolean
24
25
26
|
# File 'lib/uk_postcode/abstract_postcode.rb', line 24
def full?
raise NotImplemented
end
|
#full_valid? ⇒ Boolean
32
33
34
|
# File 'lib/uk_postcode/abstract_postcode.rb', line 32
def full_valid?
full? && valid?
end
|
#incode ⇒ Object
17
|
# File 'lib/uk_postcode/abstract_postcode.rb', line 17
def incode; nil; end
|
#outcode ⇒ Object
18
|
# File 'lib/uk_postcode/abstract_postcode.rb', line 18
def outcode; nil; end
|
#sector ⇒ Object
15
|
# File 'lib/uk_postcode/abstract_postcode.rb', line 15
def sector; nil; end
|
#to_s ⇒ Object
20
21
22
|
# File 'lib/uk_postcode/abstract_postcode.rb', line 20
def to_s
raise NotImplemented
end
|
#unit ⇒ Object
16
|
# File 'lib/uk_postcode/abstract_postcode.rb', line 16
def unit; nil; end
|
#valid? ⇒ Boolean
28
29
30
|
# File 'lib/uk_postcode/abstract_postcode.rb', line 28
def valid?
raise NotImplemented
end
|