Module: Jenkins::Model::Transience
- Included in:
- ClassMethods
- Defined in:
- lib/jenkins/model.rb
Instance Method Summary collapse
-
#transient(*properties) ⇒ Object
Mark a set of properties that should not be persisted as part of this Model’s lifecycle.
- #transient?(property) ⇒ Boolean
- #transients ⇒ Object
Instance Method Details
#transient(*properties) ⇒ Object
Mark a set of properties that should not be persisted as part of this Model’s lifecycle.
Jenkins supports transparent persistent
33 34 35 36 37 |
# File 'lib/jenkins/model.rb', line 33 def transient(*properties) properties.each do |p| transients[p.to_sym] = true end end |
#transient?(property) ⇒ Boolean
39 40 41 |
# File 'lib/jenkins/model.rb', line 39 def transient?(property) transients.keys.member?(property.to_sym) || (superclass < Model && superclass.transient?(property)) end |
#transients ⇒ Object
43 44 45 |
# File 'lib/jenkins/model.rb', line 43 def transients @transients ||= {} end |