Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/nanne007/dependency
- Owner: nanne007
- License: mit
- Created: 2016-08-14T11:35:07.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-12-14T22:44:54.000Z (almost 5 years ago)
- Last Synced: 2023-07-13T19:50:44.999Z (over 1 year ago)
- Language: Ruby
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
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
endp A.denepdencies => [[:user, {class: User}]]
class B
include A
endp 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).