Sha256: d952273e3eacde2cf2bd4daa38f302cfef90d6eb0f46006e4c52835fba1bec7a
Contents?: true
Size: 820 Bytes
Versions: 13
Compression:
Stored size: 820 Bytes
Contents
require 'builder' module Rosemary # The user object representing a registered OSM user. class User # Unique ID attr_reader :id # Display name attr_reader :display_name # When this user was created attr_reader :account_created # A little prosa about this user attr_accessor :description # All languages the user can speak attr_accessor :languages # Lat/Lon Coordinates of the users home. attr_accessor :lat, :lon, :zoom # A picture from this user attr_accessor :img 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 end end
Version data entries
13 entries across 13 versions & 1 rubygems