Sha256: a4edbcdbdb02916311adb50b591ade71e907f4164f92dc34907ae92814d37062
Contents?: true
Size: 364 Bytes
Versions: 22
Compression:
Stored size: 364 Bytes
Contents
# frozen_string_literal: true class DummyModel class Decorator < Azeroth::Decorator expose :name expose :age expose :favorite_pokemon, as: :pokemon expose :errors, if: :invalid? def name [object.first_name, object.last_name].compact.join(' ') end def errors object.valid? object.errors.messages end end end
Version data entries
22 entries across 22 versions & 1 rubygems