Class: Libphonenumber::Simple
- Inherits:
-
Object
- Object
- Libphonenumber::Simple
- Defined in:
- lib/libphonenumber-execjs/libphonenumber.rb
Instance Method Summary collapse
- #get_e164_phone_number(str, cc = nil, ndc = nil) ⇒ Object
- #get_e164_phone_number_with_meta(str, cc = nil, ndc = nil) ⇒ Object
-
#initialize(libphonenumber) ⇒ Simple
constructor
A new instance of Simple.
Constructor Details
#initialize(libphonenumber) ⇒ Simple
Returns a new instance of Simple.
27 28 29 30 |
# File 'lib/libphonenumber-execjs/libphonenumber.rb', line 27 def initialize(libphonenumber) @libphonenumber = libphonenumber @context = @libphonenumber.context end |
Instance Method Details
#get_e164_phone_number(str, cc = nil, ndc = nil) ⇒ Object
32 33 34 |
# File 'lib/libphonenumber-execjs/libphonenumber.rb', line 32 def get_e164_phone_number(str, cc=nil, ndc=nil) @context.call "getE164PhoneNumber", str, cc, ndc end |
#get_e164_phone_number_with_meta(str, cc = nil, ndc = nil) ⇒ Object
36 37 38 |
# File 'lib/libphonenumber-execjs/libphonenumber.rb', line 36 def (str, cc=nil, ndc=nil) @context.call "getE164PhoneNumberWithMeta", str, cc, ndc end |