Module: Jenkins::Model::EnvironmentProxy::ClassMethods

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#environment_classObject (readonly)

Returns the value of attribute environment_class.



20
21
22
# File 'lib/jenkins/model/environment_proxy.rb', line 20

def environment_class
  @environment_class
end

Instance Method Details

#environment_is(java_class, &block) ⇒ Object



22
23
24
25
26
27
28
29
30
# File 'lib/jenkins/model/environment_proxy.rb', line 22

def environment_is(java_class, &block)
  @environment_class = Class.new(java_class)
  if block_given?
    @environment_class.class_eval(&block)
  end
  @environment_class.class_eval do
    include EnvironmentWrapper
  end
end