Class: Buildkite::Pipelines::Steps::Group

Inherits:
Abstract
  • Object
show all
Defined in:
lib/buildkite/pipelines/steps/group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Abstract

#process, to_sym

Methods included from Attributes

#append, #get, #has?, included, #permits?, #permitted_attributes, #prepend, #set, #unset

Constructor Details

#initialize(pipeline, **args) ⇒ Group

Returns a new instance of Group.



16
17
18
19
20
# File 'lib/buildkite/pipelines/steps/group.rb', line 16

def initialize(pipeline, **args)
  @pipeline = pipeline
  @context = StepContext.new(self, **args)
  @steps = Buildkite::Builder::StepCollection.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/buildkite/pipelines/steps/group.rb', line 22

def method_missing(method_name, ...)
  if @pipeline.dsl.respond_to?(method_name)
    @pipeline.dsl.public_send(method_name, ...)
  else
    super
  end
end

Instance Attribute Details

#stepsObject (readonly)

Returns the value of attribute steps.



14
15
16
# File 'lib/buildkite/pipelines/steps/group.rb', line 14

def steps
  @steps
end

Instance Method Details

#respond_to_missing?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/buildkite/pipelines/steps/group.rb', line 30

def respond_to_missing?(...)
  @pipeline.dsl.respond_to?(...) || super
end

#to_hObject



34
35
36
# File 'lib/buildkite/pipelines/steps/group.rb', line 34

def to_h
  super.merge(group: nil, steps: steps.to_definition)
end