Class: Para::ModelFieldParsers::ClosureTree

Inherits:
Base
  • Object
show all
Defined in:
lib/para/model_field_parsers/closure_tree.rb

Instance Attribute Summary

Attributes inherited from Base

#fields_hash, #mappings, #model

Instance Method Summary collapse

Methods inherited from Base

#find_attributes_for_mapping, #initialize, register

Constructor Details

This class inherits a constructor from Para::ModelFieldParsers::Base

Instance Method Details

#applicable?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/para/model_field_parsers/closure_tree.rb', line 10

def applicable?
  model.respond_to? :roots
end

#parse!Object



6
7
8
# File 'lib/para/model_field_parsers/closure_tree.rb', line 6

def parse!
  hidden_fields.each(&fields_hash.method(:delete))
end