Class: SmartCore::Operation::Step Private

Inherits:
Object
  • Object
show all
Defined in:
lib/smart_core/operation/step.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 0.5.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method_name, **options) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • method_name (String, Symbol)
  • options (Hash<Symbol,Any>)

Since:

  • 0.5.0



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/smart_core/operation/step.rb', line 24

def initialize(method_name, **options)
  unless method_name.is_a?(Symbol) || method_name.is_a?(String)
    raise(
      SmartCore::Operation::IncorrectStepNameError,
      'Step name should be a symbol or a string'
    )
  end

  @method_name = method_name.to_sym
  @options = options # TODO: support for another operations
end

Instance Attribute Details

#method_nameString, Symbol (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (String, Symbol)

Since:

  • 0.5.0



10
11
12
# File 'lib/smart_core/operation/step.rb', line 10

def method_name
  @method_name
end

#optionsHash<Symbol,Any> (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Hash<Symbol,Any>)

Since:

  • 0.5.0



16
17
18
# File 'lib/smart_core/operation/step.rb', line 16

def options
  @options
end

Instance Method Details

#dupSmartCore::Operation::Step

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

Since:

  • 0.5.0



40
41
42
# File 'lib/smart_core/operation/step.rb', line 40

def dup
  self.class.new(method_name, **options)
end