Sha256: b379701f4dfcd13d84754b9b5005f688c033b77d2ade95e35e66d69814be223d

Contents?: true

Size: 468 Bytes

Versions: 1

Compression:

Stored size: 468 Bytes

Contents

module Tumbz
  class User
    include Model
    include Her::Model
    uses_api Tumbz.api
    custom_get :search

    def self.sign_in!(email, password)
      post_raw("auth", :email => email, :password => password) do |parsed_data|
        Thread.current[:tumbz_access_token] = parsed_data[:data][:access_token]
      end
    end

    def self.sign_out!
      Thread.current[:tumbz_access_token] = nil
      Thread.current[:tumbz_access_token].nil?
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tumbz-0.0.3 lib/tumbz/user.rb