Sha256: 69060244e14f2ae0004ae0adecd9ec21f4e02d86dfc2657a524fadbdb4c3c7be

Contents?: true

Size: 435 Bytes

Versions: 1

Compression:

Stored size: 435 Bytes

Contents

# Ruby-defer

The gem allows you to do deferred tasks within a block. It monkey patches the kernel module, so the with_defer function is available from anywhere.

## Installation

## Usage

```
with_defer do |defer|
    num = 2
    defer << -> { num *= num }
    puts num
end

puts num

# Output: 
# 2
# 4
```

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-defer-0.1.0 README.md