Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nanne007/dependency

declare dependencies of your ruby modules.
https://github.com/nanne007/dependency

Last synced: 8 days ago
JSON representation

declare dependencies of your ruby modules.

Awesome Lists containing this project

README

        

# Dependency

A simple module to declare dependencies in your modules.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'dependency'
```

And then execute:

$ bundle

Or install it yourself as:

$ gem install dependency

## Usage

``` ruby
require 'dependency'
module A
extend Dependency
dependent :user, class: User
end

p A.denepdencies => [[:user, {class: User}]]

class B
include A
end

p B.dependencies => [[:user, {class: User}]]
```

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/lerencao/dependency.

## License

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