Class: SmartCsvImport::MatchResult

Inherits:
Object
  • Object
show all
Defined in:
lib/smart_csv_import/match_result.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#confidenceObject (readonly)

Returns the value of attribute confidence.



5
6
7
# File 'lib/smart_csv_import/match_result.rb', line 5

def confidence
  @confidence
end

#strategy_nameObject (readonly)

Returns the value of attribute strategy_name.



5
6
7
# File 'lib/smart_csv_import/match_result.rb', line 5

def strategy_name
  @strategy_name
end

#target_fieldObject (readonly)

Returns the value of attribute target_field.



5
6
7
# File 'lib/smart_csv_import/match_result.rb', line 5

def target_field
  @target_field
end

Class Method Details

.matched(target_field:, confidence:, strategy_name:) ⇒ Object



9
10
11
# File 'lib/smart_csv_import/match_result.rb', line 9

def self.matched(target_field:, confidence:, strategy_name:)
  new(target_field: target_field, confidence: confidence, strategy_name: strategy_name)
end

Instance Method Details

#matched?Boolean

Returns:

  • (Boolean)


13
# File 'lib/smart_csv_import/match_result.rb', line 13

def matched? = true

#unmatched?Boolean

Returns:

  • (Boolean)


14
# File 'lib/smart_csv_import/match_result.rb', line 14

def unmatched? = false