Sha256: 72e1e4f0b6024ef73f827b3fc0260b09215b8b01f6fdec3f86567a1a1349ac09

Contents?: true

Size: 536 Bytes

Versions: 1

Compression:

Stored size: 536 Bytes

Contents

module SE
  module API
    class User
      attr_reader :json, :accept_rate, :badge_counts, :name, :link, :image, :reputation, :id, :type

      def initialize(item_json)
        @json = Hash(item_json)
        @accept_rate = @json["accept_rate"]
        @badge_counts = @json["badge_counts"]
        @name = @json["display_name"]
        @link = @json["link"]
        @image = @json["profile_image"]
        @reputation = @json["reputation"]
        @id = @json["user_id"]
        @type = @json["user_type"]
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
se-api-0.0.1 lib/se/api/types/user.rb