Class: ActiveRecord::DataIntegrity::Options
- Inherits:
-
Object
- Object
- ActiveRecord::DataIntegrity::Options
- Defined in:
- lib/active_record/data_integrity/options.rb
Overview
Options parser
Instance Method Summary collapse
-
#initialize(options) ⇒ Options
constructor
A new instance of Options.
- #only ⇒ Object
Constructor Details
#initialize(options) ⇒ Options
Returns a new instance of Options.
9 10 11 12 13 |
# File 'lib/active_record/data_integrity/options.rb', line 9 def initialize() @options = { only: .only? ? [:only].to_s.split(',') : nil } end |
Instance Method Details
#only ⇒ Object
15 16 17 |
# File 'lib/active_record/data_integrity/options.rb', line 15 def only @options[:only] || [] end |