Class: RescueFromDuplicate::Rescuer
- Inherits:
-
Object
- Object
- RescueFromDuplicate::Rescuer
- Defined in:
- lib/rescue_from_duplicate/rescuer.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(attribute, options) ⇒ Rescuer
constructor
A new instance of Rescuer.
- #rescue? ⇒ Boolean
Constructor Details
#initialize(attribute, options) ⇒ Rescuer
Returns a new instance of Rescuer.
5 6 7 8 9 |
# File 'lib/rescue_from_duplicate/rescuer.rb', line 5 def initialize(attribute, ) @attributes = [attribute] @columns = [attribute, *Array([:scope])].map(&:to_s).sort @options = end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
3 4 5 |
# File 'lib/rescue_from_duplicate/rescuer.rb', line 3 def attributes @attributes end |
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
3 4 5 |
# File 'lib/rescue_from_duplicate/rescuer.rb', line 3 def columns @columns end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/rescue_from_duplicate/rescuer.rb', line 3 def @options end |
Instance Method Details
#rescue? ⇒ Boolean
11 12 13 |
# File 'lib/rescue_from_duplicate/rescuer.rb', line 11 def rescue? true end |