Module: Jenkins::Model::Describable::Inherited

Defined in:
lib/jenkins/model/describable.rb

Overview

When a Describable class is subclassed, make it also Describable

Instance Method Summary collapse

Instance Method Details

#inherited(cls) ⇒ Object



48
49
50
51
52
53
54
55
56
57
58
# File 'lib/jenkins/model/describable.rb', line 48

def inherited(cls)
  super(cls)
  cls.extend Inherited
  describe_as_type = @describe_as_type
  cls.class_eval do
    @describe_as_type = describe_as_type
  end
  if Jenkins::Plugin.instance
    Jenkins::Plugin.instance.register_describable(cls, describe_as_type)
  end
end