Class: Gitlab::Ci::Pipeline::Seed::Environment
- Defined in:
- lib/gitlab/ci/pipeline/seed/environment.rb
Instance Attribute Summary collapse
-
#job ⇒ Object
readonly
Returns the value of attribute job.
Instance Method Summary collapse
-
#initialize(job) ⇒ Environment
constructor
A new instance of Environment.
- #to_resource ⇒ Object
Methods inherited from Base
#attributes, #errors, #included?
Constructor Details
#initialize(job) ⇒ Environment
Returns a new instance of Environment.
10 11 12 |
# File 'lib/gitlab/ci/pipeline/seed/environment.rb', line 10 def initialize(job) @job = job end |
Instance Attribute Details
#job ⇒ Object (readonly)
Returns the value of attribute job
8 9 10 |
# File 'lib/gitlab/ci/pipeline/seed/environment.rb', line 8 def job @job end |
Instance Method Details
#to_resource ⇒ Object
14 15 16 17 |
# File 'lib/gitlab/ci/pipeline/seed/environment.rb', line 14 def to_resource job.project.environments .safe_find_or_create_by(name: ) end |