lib/elasticity/job_flow_step.rb in elasticity-2.1 vs lib/elasticity/job_flow_step.rb in elasticity-2.1.1
- old
+ new
@@ -1,13 +1,23 @@
module Elasticity
module JobFlowStep
+ @@step_klasses = []
+
def to_aws_step(jobflow_step)
raise RuntimeError, '#to_aws_step is required to be defined on all job flow steps.'
end
+ def requires_installation?
+ self.class.requires_installation?
+ end
+
+ def aws_installation_step
+ self.class.aws_installation_step
+ end
+
module ClassMethods
def requires_installation?
false
end
@@ -18,9 +28,14 @@
end
def self.included(base)
base.extend(ClassMethods)
+ @@step_klasses << base
+ end
+
+ def self.steps_requiring_installation
+ @@step_klasses.select{|klass| klass.requires_installation?}
end
end
end