Class: Nocode::Step

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Util::Arrayable, Util::Optionable
Defined in:
lib/nocode/step.rb

Overview

Defines a running step. Steps should be sub-classes of this class as well as to implement #perform.

Constant Summary

Constants included from Util::Optionable

Util::Optionable::OPTION_PREFIX

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Util::Optionable

included, #method_missing, #respond_to_missing?

Methods included from Util::Arrayable

#array

Constructor Details

#initialize(context: Context.new, name: '', options: {}, type: '') ⇒ Step

Returns a new instance of Step.



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/nocode/step.rb', line 21

def initialize(
  context: Context.new,
  name: '',
  options: {},
  type: ''
)
  @context = context
  @options = options
  @name    = name
  @type    = type
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Nocode::Util::Optionable

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



11
12
13
# File 'lib/nocode/step.rb', line 11

def context
  @context
end

#nameObject (readonly)

Returns the value of attribute name.



11
12
13
# File 'lib/nocode/step.rb', line 11

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



11
12
13
# File 'lib/nocode/step.rb', line 11

def options
  @options
end

#typeObject (readonly)

Returns the value of attribute type.



11
12
13
# File 'lib/nocode/step.rb', line 11

def type
  @type
end