Method: Annotatable::ClassMethods#inherited_with_annotatable
- Defined in:
- lib/annotatable.rb
#inherited_with_annotatable(subclass) ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/annotatable.rb', line 42 def inherited_with_annotatable(subclass) inherited_without_annotatable(subclass) (['inherited_annotations'] + (@inherited_annotations || [])).each do |t| ivar = "@#{t}" subclass.instance_variable_set(ivar, instance_variable_get(ivar)) end end |