Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wizardone/concrete
Concrete inheritance for Ruby classes
https://github.com/wizardone/concrete
class-attribute concrete inheritance ruby
Last synced: 22 days ago
JSON representation
Concrete inheritance for Ruby classes
- Host: GitHub
- URL: https://github.com/wizardone/concrete
- Owner: wizardone
- License: mit
- Created: 2016-10-17T07:12:27.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-04T13:27:22.000Z (about 8 years ago)
- Last Synced: 2024-12-18T05:46:39.686Z (23 days ago)
- Topics: class-attribute, concrete, inheritance, ruby
- Language: Ruby
- Homepage:
- Size: 13.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Concrete
[![Build Status](https://travis-ci.org/wizardone/concrete.svg?branch=master)](https://travis-ci.org/wizardone/concrete)
[![codecov](https://codecov.io/gh/wizardone/concrete/branch/master/graph/badge.svg)](https://codecov.io/gh/wizardone/concrete)## Installation
Add this line to your application's Gemfile:
```ruby
gem 'concrete_attributes'
```And then execute:
$ bundle
Or install it yourself as:
$ gem install concrete_attributes
## Usage
Concrete gives you class level inheritance, similar to Rails
`class_attribute`, but the implementation is far less complex.
```ruby
class A
extend ConcreteAttributes
concrete_attribute :car
end
A.car = 'bmw'class B < A
end
B.car
=> 'bmw'B.car = 'audi'
A.car
=> 'bmw'
```## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/wizardone/concrete. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).