Class: Buildkite::Pipelines::Steps::Abstract

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Attributes
Defined in:
lib/buildkite/pipelines/steps/abstract.rb

Direct Known Subclasses

Block, Command, Group, Input, Trigger, Wait

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Attributes

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

Constructor Details

#initialize(**args) ⇒ Abstract

Returns a new instance of Abstract.



18
19
20
# File 'lib/buildkite/pipelines/steps/abstract.rb', line 18

def initialize(**args)
  @context = StepContext.new(self, **args)
end

Class Method Details

.to_symObject



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

def self.to_sym
  name.split('::').last.downcase.to_sym
end

Instance Method Details

#process(block) ⇒ Object



22
23
24
# File 'lib/buildkite/pipelines/steps/abstract.rb', line 22

def process(block)
  instance_exec(@context, &block)
end