Sha256: 631cfbf899a37efbb9e4b1fdc2eae1a8c69ac364b524c50ec7d106b06d5a1f66

Contents?: true

Size: 862 Bytes

Versions: 1

Compression:

Stored size: 862 Bytes

Contents

# ActAsTimeAsBoolean

_Add time_as_boolean feature to your ruby classes_

## Installation

```shell
gem install act_as_time_as_boolean
```

Or in your Gemfile:

```ruby
gem 'act_as_time_as_boolean'
```

## Usage

```ruby
class Item
  include ActAsTimeAsBoolean

  attr_accessor :active_at

  time_as_boolean :active, opposite: :inactive
end

item = Item.new

p item.active?
#=> false

p item.inactive?
#=> true

item.active = true

p item.active?
#=> true

p item.inactive?
#=> false
```

## Contributing

1. Fork repository
2. Create a branch following a [successfull branching model](http://nvie.com/posts/a-successful-git-branching-model/)
3. Write your feature/fix
4. Write tests
5. Pull request

## Licence

Released under the MIT License. See the [LICENSE](https://github.com/caedes/act_as_time_as_boolean/blob/master/LICENSE.md) file for further details.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
act_as_time_as_boolean-0.1.0 README.md