Sha256: 88dd27d3d8295d06338771862276062580d409ff955dc1f972e3958b78b1be7c

Contents?: true

Size: 724 Bytes

Versions: 36

Compression:

Stored size: 724 Bytes

Contents

module DeployGate
  class User
    attr_reader :name

    # @param [String] name
    # @return [DeployGate::User]
    def initialize(name)
      @name = name
    end

    # @param [String] name
    # @param [String] email
    # @param [String] password
    # @return [DeployGate::User]
    def self.create(name, email, password)
      locale = Locale.current.language
      results = DeployGate::API::V1::User.create(name, email, password, locale)
      return if results[:error]
      DeployGate::User.new(results[:name])
    end

    # @param [String] name
    # @param [String] email
    # @return [Boolean]
    def self.registered?(name, email)
      DeployGate::API::V1::User.registered?(name, email)
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
deploygate-0.8.3 lib/deploygate/user.rb
deploygate-0.8.2 lib/deploygate/user.rb
deploygate-0.8.1 lib/deploygate/user.rb
deploygate-0.8.0 lib/deploygate/user.rb
deploygate-0.7.0 lib/deploygate/user.rb
deploygate-0.6.8 lib/deploygate/user.rb
deploygate-0.6.7 lib/deploygate/user.rb
deploygate-0.6.6 lib/deploygate/user.rb
deploygate-0.6.5 lib/deploygate/user.rb
deploygate-0.6.4 lib/deploygate/user.rb
deploygate-0.6.3 lib/deploygate/user.rb
deploygate-0.6.2 lib/deploygate/user.rb
deploygate-0.6.1 lib/deploygate/user.rb
deploygate-0.6.0 lib/deploygate/user.rb
deploygate-0.5.6 lib/deploygate/user.rb
deploygate-0.5.5 lib/deploygate/user.rb
deploygate-0.5.4 lib/deploygate/user.rb
deploygate-0.5.3 lib/deploygate/user.rb
deploygate-0.5.2 lib/deploygate/user.rb
deploygate-0.5.1 lib/deploygate/user.rb