Class: Rung::Operation Abstract

Inherits:
Object
  • Object
show all
Extended by:
Definition::OperationDSL, Definition::StepsDSL
Defined in:
lib/rung/operation.rb

Overview

This class is abstract.

Base class for all user-defined operations

Instance Attribute Summary

Attributes included from Definition::StepsDSL

#steps_definition

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Definition::OperationDSL

around, around_callbacks, around_each, around_each_callbacks

Methods included from Definition::StepsDSL

add_generic_step, always, failure, step, tee

Class Method Details

.call(initial_state = {}) ⇒ Rung::Runner::State

#call shortcut

Parameters:

  • initial_state (Hash) (defaults to: {})

Returns:

  • (Rung::Runner::State)

11
12
13
# File 'lib/rung/operation.rb', line 11

def self.call(initial_state = {})
  new.call(initial_state)
end

Instance Method Details

#call(initial_state = {}) ⇒ Rung::Runner::State

Starts Runner::Runner and returns its final state

Parameters:

  • initial_state (Hash) (defaults to: {})

Returns:

  • (Rung::Runner::State)

18
19
20
# File 'lib/rung/operation.rb', line 18

def call(initial_state = {})
  Runner::Runner.new(self, initial_state).call
end