Class: SmartCsvImport::StrategyFailure

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#errorObject

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



4
5
6
# File 'lib/smart_csv_import/strategy_failure.rb', line 4

def error
  @error
end

#strategy_nameObject

Returns the value of attribute strategy_name

Returns:

  • (Object)

    the current value of strategy_name



4
5
6
# File 'lib/smart_csv_import/strategy_failure.rb', line 4

def strategy_name
  @strategy_name
end

Instance Method Details

#failure?Boolean

Returns:

  • (Boolean)


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

def failure?
  true
end

#reasonObject



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

def reason
  "#{error.class}: #{error.message}"
end