crtype

Version, currently master branch1 version
  • master branchlatestSep 28, 2016

github.com/unn4m3d/crtype

No description declared in shard.yml.

6 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  crtype:
    github: unn4m3d/crtype
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
no constraint declared
License
MIT
Author
unn4m3d

Dependencies

This version declares no dependencies.

README

crtype

Types can be stored in variables

Installation

Add this to your application's shard.yml:

dependencies:
  crtype:
    github: unn4m3d/crtype

Usage

require "crtype"


types = Array(CrType::AbstractType).new

types.push CrType::Type(UInt8).new
types.push CrType::Type(UInt16).new
types.push CrType::Type(UInt32).new
types.push CrType::Type(UInt64).new

types.each{|e| puts e.inner_type.name}

int8 = 0u8

types.each{|e|
  puts (e.inner_type.new(int8) - 1u8).to_s(16)
}

Contributing

  1. Fork it ( https://github.com/unn4m3d/crtype/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors