Sha256: 2957e32f0b43cb70882afd4422c4016df5794397066745aa0cf9034183b09145

Contents?: true

Size: 433 Bytes

Versions: 1

Compression:

Stored size: 433 Bytes

Contents

module Rubyoverflow
  class Users

    def initialize(client)
      @client = client
    end

    def fetch(params = {})
      ids = params.delete(:id) if params[:id]
      ids = ids.join(';') if ids and ids.kind_of? Array
      hash,url = @client.request "users#{"/#{ids}" if ids}", params

      Hashie::Mash.new hash
    end
  end

  class Client
    @users = nil

    def users
      @users ||= Users.new(self)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubyoverflow-0.5 lib/rubyoverflow/users.rb