Class: AppEngine::Datastore::PhoneNumber

Inherits:
String
  • Object
show all
Defined in:
lib/appengine-apis/datastore_types.rb

Overview

A human-readable phone number. No validation is performed because phone numbers have many different formats - local, long distance, domestic, international, internal extension, TTY, VOIP, SMS, and alternative networks like Skype, XFire and Roger Wilco. They all have their own numbering and addressing formats.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new_from_java(phone) ⇒ Object



156
157
158
# File 'lib/appengine-apis/datastore_types.rb', line 156

def self.new_from_java(phone)
  self.new(phone.getNumber)
end

Instance Method Details

#to_javaObject



152
153
154
# File 'lib/appengine-apis/datastore_types.rb', line 152

def to_java
  JavaDatastore::PhoneNumber.new(java.lang.String.new(self))
end