Class: Smith::Workflow::Graph::Validator
- Inherits:
-
Object
- Object
- Smith::Workflow::Graph::Validator
- Defined in:
- lib/smith/workflow/graph/validator.rb
Instance Attribute Summary collapse
-
#graph ⇒ Object
readonly
Returns the value of attribute graph.
Instance Method Summary collapse
-
#initialize(graph) ⇒ Validator
constructor
A new instance of Validator.
- #report ⇒ Object
Constructor Details
#initialize(graph) ⇒ Validator
Returns a new instance of Validator.
9 10 11 |
# File 'lib/smith/workflow/graph/validator.rb', line 9 def initialize(graph) @graph = graph end |
Instance Attribute Details
#graph ⇒ Object (readonly)
Returns the value of attribute graph.
7 8 9 |
# File 'lib/smith/workflow/graph/validator.rb', line 7 def graph @graph end |
Instance Method Details
#report ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/smith/workflow/graph/validator.rb', line 13 def report diagnostics = all_diagnostics Report.new( status: status_for(diagnostics), workflow_class: graph.workflow_class.name, initial_state: graph.initial_state, states: graph.states, transitions: graph.transition_snapshots, diagnostics: diagnostics, metrics: Metrics.new(graph, reachable_transition_names).to_h ) end |