Module: Jenkins::Model::Describable::DescribeAs

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

Instance Method Summary collapse

Instance Method Details

#describe_as(cls, options = {}) ⇒ Object

Java class that represents the extension point, which gets eventually set to Descriptor.clazz :with will use this java class as the type of descriptor.



44
45
46
47
# File 'lib/jenkins/model/describable.rb', line 44

def describe_as cls, options = {}
  @describe_as_type = verify_java_class(cls)
  @descriptor_is = verify_java_class(options[:with]) if options[:with]
end

#describe_as_typeObject



49
50
51
# File 'lib/jenkins/model/describable.rb', line 49

def describe_as_type
  @describe_as_type ? @describe_as_type : (superclass.describe_as_type if superclass.respond_to?(:describe_as_type)) || verify_java_class(self)
end

#descriptor_isObject



53
54
55
# File 'lib/jenkins/model/describable.rb', line 53

def descriptor_is
  @descriptor_is ? @descriptor_is : (superclass.descriptor_is if superclass.respond_to?(:descriptor_is)) || DefaultDescriptor
end