Add this line to your application's Gemfile:
gem 'concrete_attributes'
And then execute:
$ bundle
Or install it yourself as:
$ gem install concrete_attributes
Concrete gives you class level inheritance, similar to Rails
class_attribute
, but the implementation is far less complex.
class A
extend ConcreteAttributes
concrete_attribute :car
end
A.car = 'bmw'
class B < A
end
B.car
=> 'bmw'
B.car = 'audi'
A.car
=> 'bmw'
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 code of conduct.
The gem is available as open source under the terms of the MIT License.