https://github.com/nanne007/dependency
declare dependencies of your ruby modules.
https://github.com/nanne007/dependency
Last synced: 4 months 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 (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-12-14T22:44:54.000Z (over 5 years ago)
- Last Synced: 2024-12-30T13:53:48.344Z (5 months 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).