New kittyverse library / gem - helper classes for cattributes, trait types, traits, genes, genomes and more for cryptokitties and copycats cryptocollectibles (on the blockchain)

Gerald Bauer <[email protected]>
Newsgroups gmane.comp.lang.ruby.general
Message-ID <CAAxEZd9ezcLAnGxE_g3nDWs4-y3j2cuJJR2kOnDU85Lyxtk4KA@mail.gmail.com>
Hello,

   I've put together a new kittyverse library / gem [1] that includes
helper classes for cattributes, trait types, traits, genes, genomes
and more for cryptokitties and copycats cryptocollectibles (on the
blockchain). Example usage for trait lookups:

require 'kittyverse'

t = Traits[ 'FU00' ]
p t.class      #=> Trait
p t.name       #=> "savannah"
p t.type.name  #=> "Fur"
p t.code       #=> "FU00"
p t.kai        #=> "1"

# -or-

t = Trait.find_by_code( 'FU00' )
t = Trait.find_by( code: 'FU00' )
t = Traits[ 'savannah' ]
t = Traits[ 'Savannah' ]
t = Trait.find_by_name( 'Savannah' )
t = Trait.find_by( name: 'Savannah' )
t = Traits[ :body ][ '1' ]
t = Traits[ :body ][ '00' ]
t = Traits[ :body ][ 0 ]
t = Traits[ 'FU' ][ '00' ]
t = Traits[ 'FU' ][0]
t = Traits[ :FU ][0]
t = Traits[ :FU00 ]
t = Traits[ 'Fur' ][0]
# ...

   Or generate a dataset in json [2] for all fancy, exclusive and
special edition cats:

require 'kittyverse'

File.open( 'build/fancies.json', 'w:utf-8' ) do |f|
   f.write JSON.pretty_generate( FANCIES )
end

  And much more. Happy data wrangling and bits & bytes slicing w/
ruby. Cheers. Prost.

[1] https://github.com/cryptocopycats/kittyverse
[2] https://github.com/cryptocopycats/kittyverse.json

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.