Sha256: 82413dadc58b4f057d5d74fedf6ef0bfdfb7be9a6bb342ba297475f040428596
Contents?: true
Size: 406 Bytes
Versions: 5
Compression:
Stored size: 406 Bytes
Contents
require 'extensions/hash' module Moblues module DataModel class Entity < Struct.new(:name, :parent_entity, :attributes, :relationships) def initialize(params) p = params.compact super( p.fetch(:name), p.fetch(:parent_entity, 'NSManagedObject'), p.fetch(:attributes, []), p.fetch(:relationships, []) ) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems