Sha256: a55eefe64746144ba68d1267e2f0609a1ff08e2844020e3488da1884d4476edb
Contents?: true
Size: 724 Bytes
Versions: 1
Compression:
Stored size: 724 Bytes
Contents
# try try/10_basics_try.rb # An instance of boned must be running: # ruby -rubygems bin/boned -e dev -d start require 'boned' #Bone.debug = true Bone.source = "http://localhost:3073" Bone.credentials = 'atoken:crystal' ## Bone.register Bone.register Bone.token, Bone.secret #=> 'atoken' ## Bone.register is not possible for existing key Bone.register Bone.token, Bone.secret #=> nil ## Bone.generate @token, @secret = *Bone.generate @token.size #=> 24 ## Can destroy a token Bone.destroy @token #=> true ## Cannot destroy a token that doesn't exist Bone.destroy 'bogus' #=> false ## Bone.get returns nil for bad key Bone['bogus'] #=> nil ## Bone.keys returns empty array Bone.keys #=> [] Bone.destroy Bone.token
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
boned-0.3.2 | try/10_basics_try.rb |