Class: CallSheet::StepAdapters::Base Private

Inherits:
Object
  • Object
show all
Includes:
Deterministic::Prelude::Result
Defined in:
lib/call_sheet/step_adapters/base.rb

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.

Direct Known Subclasses

Map, Raw, Tee, Try

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(operation, options) ⇒ Base

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 a new instance of Base.



10
11
12
13
# File 'lib/call_sheet/step_adapters/base.rb', line 10

def initialize(operation, options)
  @operation = operation
  @options = options
end

Instance Attribute Details

#operationObject (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.



7
8
9
# File 'lib/call_sheet/step_adapters/base.rb', line 7

def operation
  @operation
end

#optionsObject (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.



8
9
10
# File 'lib/call_sheet/step_adapters/base.rb', line 8

def options
  @options
end

Instance Method Details

#arityObject

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.



15
16
17
# File 'lib/call_sheet/step_adapters/base.rb', line 15

def arity
  operation.is_a?(Proc) ? operation.arity : operation.method(:call).arity
end