Class: OpenStreetMap::User
- Inherits:
-
Object
- Object
- OpenStreetMap::User
- Defined in:
- lib/open_street_map/user.rb
Instance Attribute Summary collapse
-
#account_created ⇒ Object
readonly
When this user was created.
-
#description ⇒ Object
A little prosa about this user.
-
#display_name ⇒ Object
readonly
Display name.
-
#id ⇒ Object
readonly
Unique ID.
-
#img ⇒ Object
A picture from this user.
-
#languages ⇒ Object
All languages the user can speak.
-
#lat ⇒ Object
Lat/Lon Coordinates of the users home.
-
#lon ⇒ Object
Lat/Lon Coordinates of the users home.
-
#zoom ⇒ Object
Lat/Lon Coordinates of the users home.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(attrs = {}) ⇒ User
Returns a new instance of User.
25 26 27 28 29 30 31 |
# File 'lib/open_street_map/user.rb', line 25 def initialize(attrs = {}) attrs.stringify_keys! @id = attrs['id'].to_i if attrs['id'] @display_name = attrs['display_name'] @account_created = Time.parse(attrs['account_created']) rescue nil @languages = [] end |
Instance Attribute Details
#account_created ⇒ Object (readonly)
When this user was created
11 12 13 |
# File 'lib/open_street_map/user.rb', line 11 def account_created @account_created end |
#description ⇒ Object
A little prosa about this user
14 15 16 |
# File 'lib/open_street_map/user.rb', line 14 def description @description end |
#display_name ⇒ Object (readonly)
Display name
8 9 10 |
# File 'lib/open_street_map/user.rb', line 8 def display_name @display_name end |
#id ⇒ Object (readonly)
Unique ID
5 6 7 |
# File 'lib/open_street_map/user.rb', line 5 def id @id end |
#img ⇒ Object
A picture from this user
23 24 25 |
# File 'lib/open_street_map/user.rb', line 23 def img @img end |
#languages ⇒ Object
All languages the user can speak
17 18 19 |
# File 'lib/open_street_map/user.rb', line 17 def languages @languages end |
#lat ⇒ Object
Lat/Lon Coordinates of the users home.
20 21 22 |
# File 'lib/open_street_map/user.rb', line 20 def lat @lat end |
#lon ⇒ Object
Lat/Lon Coordinates of the users home.
20 21 22 |
# File 'lib/open_street_map/user.rb', line 20 def lon @lon end |
#zoom ⇒ Object
Lat/Lon Coordinates of the users home.
20 21 22 |
# File 'lib/open_street_map/user.rb', line 20 def zoom @zoom end |