Module: Enums::DuplicateStrategy

Defined in:
lib/enums/duplicate_strategy.rb

Overview

Public: Contains all valid options as Fixnum constants for the various ways that potential duplicate records can be handled.

Constant Summary collapse

ALLOW =
0
REPLACE =
1
SKIP =
2
ALL_OPTIONS =
[ALLOW, REPLACE, SKIP]

Instance Method Summary collapse

Instance Method Details

#valid?(value) ⇒ Boolean

Public: Will advise if the provided value passed in is valid. Note: This is a module method, not an ‘instance’ method, as the generated documentation might imply.

value   - String value to test for validity.

Returns Boolean whether the value provided is valid.

Returns:

  • (Boolean)


19
20
21
# File 'lib/enums/duplicate_strategy.rb', line 19

def valid?(value)
  ALL_OPTIONS.include? value
end