Class: CSVDecision2::Scan::InputHashes Private

Inherits:
Object
  • Object
show all
Defined in:
lib/csv_decision2/scan.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.

Derive the parsed input hash, using a cache for speed.

Instance Method Summary collapse

Constructor Details

#initializeInputHashes

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 InputHashes.



86
87
88
# File 'lib/csv_decision2/scan.rb', line 86

def initialize
  @input_hashes = {}
end

Instance Method Details

#data(decision:, path:, input:) ⇒ Hash{Symbol=>Object}

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 Parsed input hash.

Parameters:

  • path (Array<Symbol] Path for the input hash.)

    ath [Array<Symbol] Path for the input hash.

  • input (Hash{Symbol=>Object})

    Input hash.

Returns:

  • (Hash{Symbol=>Object})

    Parsed input hash.



93
94
95
96
97
98
99
# File 'lib/csv_decision2/scan.rb', line 93

def data(decision:, path:, input:)
  result = input(decision: decision, path: path, input: input)

  decision.input(result) unless result == {}

  result
end