Module: Jenkins::Model::Transience
- 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
56 57 58 59 60 |
# File 'lib/jenkins/model.rb', line 56 def transient(*properties) properties.each do |p| transients[p.to_sym] = true end end |
#transient?(property) ⇒ Boolean
62 63 64 |
# File 'lib/jenkins/model.rb', line 62 def transient?(property) transients.keys.member?(property.to_sym) || (superclass < Model && superclass.transient?(property)) end |
#transients ⇒ Object
66 67 68 |
# File 'lib/jenkins/model.rb', line 66 def transients @transients ||= {} end |