Class: ChronoForge::Definition::Node

Inherits:
Struct
  • Object
show all
Defined in:
lib/chrono_forge/definition.rb

Overview

kind: :execute :wait :wait_until :continue_if :branch :merge :repeat :dynamic A node binds to runtime logs by EXACT step_name when known, else by step_name_pattern (a prefix for fan-out/repeat/dynamic).

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#guardObject

Returns the value of attribute guard

Returns:

  • (Object)

    the current value of guard



11
12
13
# File 'lib/chrono_forge/definition.rb', line 11

def guard
  @guard
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



11
12
13
# File 'lib/chrono_forge/definition.rb', line 11

def id
  @id
end

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



11
12
13
# File 'lib/chrono_forge/definition.rb', line 11

def kind
  @kind
end

#labelObject

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



11
12
13
# File 'lib/chrono_forge/definition.rb', line 11

def label
  @label
end

#step_nameObject

Returns the value of attribute step_name

Returns:

  • (Object)

    the current value of step_name



11
12
13
# File 'lib/chrono_forge/definition.rb', line 11

def step_name
  @step_name
end

#step_name_patternObject

Returns the value of attribute step_name_pattern

Returns:

  • (Object)

    the current value of step_name_pattern



11
12
13
# File 'lib/chrono_forge/definition.rb', line 11

def step_name_pattern
  @step_name_pattern
end

#warningsObject

Returns the value of attribute warnings

Returns:

  • (Object)

    the current value of warnings



11
12
13
# File 'lib/chrono_forge/definition.rb', line 11

def warnings
  @warnings
end

Instance Method Details

#dynamic?Boolean

Returns:

  • (Boolean)


15
# File 'lib/chrono_forge/definition.rb', line 15

def dynamic? = kind == :dynamic || step_name.nil?

#to_hObject

Default a missing warnings member to [] here (rather than overriding the struct's generated reader, which triggers a method-redefined warning).



19
# File 'lib/chrono_forge/definition.rb', line 19

def to_h = super.merge(warnings: self[:warnings] || [])