Module: HyperResource::Modules::InternalAttributes
- Included in:
- HyperResource
- Defined in:
- lib/hyper_resource/modules/internal_attributes.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/hyper_resource/modules/internal_attributes.rb', line 4 def self.included(base) base.extend(ClassMethods) base._hr_class_attributes.each do |attr| base._hr_class_attribute attr end (base._hr_attributes - base._hr_class_attributes).each do |attr| base.send(:attr_accessor, attr) end ## Fallback attributes fall back from instance to class. (base._hr_attributes & base._hr_class_attributes).each do |attr| base._hr_fallback_attribute attr end end |