Method: Consist::Step#initialize
- Defined in:
- lib/consist/step.rb
#initialize(id:, &definition) ⇒ Step
Returns a new instance of Step.
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/consist/step.rb', line 9 def initialize(id:, &definition) @commands = [] @id = id @required_user = :root if definition instance_eval(&definition) else contents = Consist::Resolver.new(pwd: Dir.pwd).resolve_artifact(type: :step, id:) instance_eval(contents) end end |