Sha256: a1b1152e11ef83b74201d2b04006b521b4e040af1070550e6c0fa076efa48270

Contents?: true

Size: 258 Bytes

Versions: 1

Compression:

Stored size: 258 Bytes

Contents

require 'virtus'

module Kamerling class UUIDEntity
  include Equalizer.new :uuid

  include Virtus.model

  attribute :uuid, String, default: -> * { UUID.new }

  class << self
    alias_method :from_h, :new
  end

  alias_method :to_h, :attributes
end end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kamerling-0.0.2 lib/kamerling/uuid_entity.rb