Class: Attach::ModelExtension::Inclusion
- Inherits:
-
Object
- Object
- Attach::ModelExtension::Inclusion
- Defined in:
- lib/attach/model_extension/inclusion.rb
Instance Method Summary collapse
-
#initialize(scope, *options) ⇒ Inclusion
constructor
A new instance of Inclusion.
- #prepare ⇒ Object
Constructor Details
#initialize(scope, *options) ⇒ Inclusion
Returns a new instance of Inclusion.
7 8 9 10 11 |
# File 'lib/attach/model_extension/inclusion.rb', line 7 def initialize(scope, *) @scope = scope = @fields = {} end |
Instance Method Details
#prepare ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/attach/model_extension/inclusion.rb', line 13 def prepare return if @scope.empty? prepare_fields end |