lib/hanami/entity.rb in hanami-model-1.3.2 vs lib/hanami/entity.rb in hanami-model-1.3.3

- old
+ new

@@ -1,7 +1,9 @@ -require 'hanami/model/types' +# frozen_string_literal: true +require "hanami/model/types" + module Hanami # An object that is defined by its identity. # See "Domain Driven Design" by Eric Evans. # # An entity is the core of an application, where the part of the domain @@ -48,11 +50,11 @@ # # @since 0.1.0 # # @see Hanami::Repository class Entity - require 'hanami/entity/schema' + require "hanami/entity/schema" # Syntactic shortcut to reference types in custom schema DSL # # @since 0.7.0 module Types @@ -186,10 +188,10 @@ def to_h Utils::Hash.deep_dup(attributes) end # @since 0.7.0 - alias to_hash to_h + alias_method :to_hash, :to_h protected # Check if the attribute is allowed to be read #