var

Object.var macro for Crystal
0.2.0 released
maiha/var.cr
3 1
maiha

var.cr Build Status

Object.var macro for Crystal.

  • crystal: 0.23.1

Usage

class MyClass
  var foo : String
  var debug = false
end

my = MyClass.new
my.foo # raises Var::NotReady

my.foo = "ok"
my.foo # => "ok"

my.debug? # => false

Installation

Add this to your application's shard.yml:

dependencies:
  var:
    github: maiha/var.cr
    version: 0.2.0

Then require it in your app.

require "var"

Development

make test

Contributing

  1. Fork it ( https://github.com/maiha/var.cr/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

  • maiha maiha - creator, maintainer
var:
  github: maiha/var.cr
  version: ~> 0.2.0
License MIT
Crystal none

Authors

Dependencies 0

Development Dependencies 0

Dependents 4

Last synced .
search fire star recently