Sha256: 5cb302ea9324df7c6b2776600f23b8dae80d43f4c55340ece111b7d0e18b2b77
Contents?: true
Size: 355 Bytes
Versions: 1
Compression:
Stored size: 355 Bytes
Contents
# frozen_string_literal: true module Lite module Decorator module Infered def decorator_class return @decorator_class if defined?(@decorator_class) @decorator_class = "#{self.class.name}Decorator".safe_constantize end def decorator @decorator ||= decorator_class&.new(self) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lite-decorator-2.0.0 | lib/lite/decorator/infered.rb |