var
var.cr 
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
- Fork it ( https://github.com/maiha/var.cr/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- maiha maiha - creator, maintainer