Sha256: 1895f37fc22e2e4298208cf09d337eefd26531b2cfd91f420b63fb5eed079c5f
Contents?: true
Size: 837 Bytes
Versions: 1
Compression:
Stored size: 837 Bytes
Contents
# frozen_string_literal: true $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rubygems' require 'ncmb' require 'yaml' yaml = YAML.load_file(File.join(File.dirname(__FILE__), '..', 'setting.yml')) NCMB.initialize( application_key: yaml['application_key'], client_key: yaml['client_key'] ) if @user = NCMB::User.login('testUser2', 'testPassword2') puts NCMB.CurrentUser.userName NCMB.CurrentUser.delete begin @user.delete rescue => e puts e.message end end @user = NCMB::User.new @user.set('userName', 'testUser2') @user.set('password', 'testPassword2') if @user.signUp puts 'User create successful.' @user.set('Hello', 'World') @user.update puts 'User update successful.' else puts "User create failed. #{@user.error.message}" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ncmb-ruby-client-0.2.0 | examples/user_test.rb |