Class: DurableFlow::DefinitionNode

Inherits:
Data
  • Object
show all
Defined in:
lib/durable_flow/definition_graph.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



4
5
6
# File 'lib/durable_flow/definition_graph.rb', line 4

def id
  @id
end

#metadataObject (readonly)

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



4
5
6
# File 'lib/durable_flow/definition_graph.rb', line 4

def 
  @metadata
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



4
5
6
# File 'lib/durable_flow/definition_graph.rb', line 4

def name
  @name
end

#source_fileObject (readonly)

Returns the value of attribute source_file

Returns:

  • (Object)

    the current value of source_file



4
5
6
# File 'lib/durable_flow/definition_graph.rb', line 4

def source_file
  @source_file
end

#source_lineObject (readonly)

Returns the value of attribute source_line

Returns:

  • (Object)

    the current value of source_line



4
5
6
# File 'lib/durable_flow/definition_graph.rb', line 4

def source_line
  @source_line
end

#target_workflow_classObject (readonly)

Returns the value of attribute target_workflow_class

Returns:

  • (Object)

    the current value of target_workflow_class



4
5
6
# File 'lib/durable_flow/definition_graph.rb', line 4

def target_workflow_class
  @target_workflow_class
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



4
5
6
# File 'lib/durable_flow/definition_graph.rb', line 4

def type
  @type
end

#workflow_classObject (readonly)

Returns the value of attribute workflow_class

Returns:

  • (Object)

    the current value of workflow_class



4
5
6
# File 'lib/durable_flow/definition_graph.rb', line 4

def workflow_class
  @workflow_class
end

Instance Method Details

#to_hObject Also known as: as_json



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/durable_flow/definition_graph.rb', line 14

def to_h
  {
    id: id,
    type: type,
    name: name,
    workflow_class: workflow_class,
    target_workflow_class: target_workflow_class,
    source_file: source_file,
    source_line: source_line,
    metadata:  || {}
  }.compact
end