Sha256: 4a8abf0f614e05faf3031244f593dcdd43ed33a37b182ca6dfdab2dcc985ca6c

Contents?: true

Size: 360 Bytes

Versions: 14

Compression:

Stored size: 360 Bytes

Contents

# frozen_string_literal: true

class AppleRepository < Ibrain::BaseRepository
  def initialize(record, params)
    super(nil, record)

    @params = params
    @collection = Ibrain.user_class
  end

  def find_or_initialize!
    user = @collection.find_by_apple(uid: params['uid'])
    return user if user.present?

    @collection.create_with_line!
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
its-ruby-auth-0.0.1 app/repositories/apple_repository.rb
ibrain-auth-0.3.20 app/repositories/apple_repository.rb
ibrain-auth-0.3.19 app/repositories/apple_repository.rb
ibrain-auth-0.3.18 app/repositories/apple_repository.rb
ibrain-auth-0.3.17 app/repositories/apple_repository.rb
ibrain-auth-0.3.16 app/repositories/apple_repository.rb
ibrain-auth-0.3.15 app/repositories/apple_repository.rb
ibrain-auth-0.3.14 app/repositories/apple_repository.rb
ibrain-auth-0.3.13 app/repositories/apple_repository.rb
ibrain-auth-0.3.12 app/repositories/apple_repository.rb
ibrain-auth-0.3.11 app/repositories/apple_repository.rb
ibrain-auth-0.3.10 app/repositories/apple_repository.rb
ibrain-auth-0.3.9 app/repositories/apple_repository.rb
ibrain-auth-0.3.8 app/repositories/apple_repository.rb