Sha256: fbb77291b6dfc43fda4aaffe2891cbc01b85291f1115b0ea738d253095ee23a2
Contents?: true
Size: 357 Bytes
Versions: 1
Compression:
Stored size: 357 Bytes
Contents
# frozen_string_literal: true module Lite module Decorator module Inference 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.1 | lib/lite/decorator/inference.rb |