class Para::ModelFieldParsers::Base
Attributes
Public Class Methods
Source
# File lib/para/model_field_parsers/base.rb, line 10 def initialize(model, fields_hash, mappings) @model = model @fields_hash = fields_hash @mappings = mappings end
Source
# File lib/para/model_field_parsers/base.rb, line 4 def self.register(key, parser) ModelFieldParsers.registered_parsers[key] = parser end
Public Instance Methods
Source
# File lib/para/model_field_parsers/base.rb, line 20 def find_attributes_for_mapping(type) mappings.select { |k, v| v == type.to_s }.keys.map(&:to_sym) end