Sha256: b7fb425ac297b33729030dbaadca5e778643e3002330a2f052f177cc72bd1b83
Contents?: true
Size: 803 Bytes
Versions: 55
Compression:
Stored size: 803 Bytes
Contents
module Appfuel module Memory class Mapper < Appfuel::Repository::Mapper def to_storage(domain, opts = {}) excluded = opts[:exclude] || [] data = {} each_entity_attr(domain.domain_name) do |entry| attr_name = entry.storage_attr next if excluded.include?(attr_name) || entry.skip? data[attr_name] = entity_value(domain, entry) end data end def exists?(criteria) domain_expr = criteria.exists_expr domain_name = domain_expr.domain_name domain_attr = domain_expr.domain_attr db_expr = create_db_expr(domain_name, domain_attr) db_model = db_class_mapped(domain_name, domain_attr) db_model.exists?([db_expr.string, db_expr.values]) end end end end
Version data entries
55 entries across 55 versions & 1 rubygems