Sha256: 95f7d91fd86db7f8b5c62d415dd0525110c0abeadb44543d18adb24afe19ebf4
Contents?: true
Size: 738 Bytes
Versions: 26
Compression:
Stored size: 738 Bytes
Contents
# typed: false # frozen_string_literal: true module Setsuzoku # Set of methods/functionality for managing a classes config_context module HasConfigContext extend T::Sig extend T::Helpers attr_accessor :config_context # # get_from_context sig { params(method: Symbol).returns(T.untyped) } # # Retrieve a value from config_context or call the default method implementation for the class. # # @return [Any] the value of the key in config_context, or return value of the method. def get_from_context(method) if self.config_context.key?(method) self.get_registered_instance_val(method) else self.send(method) if self.respond_to?(method) end end end end
Version data entries
26 entries across 26 versions & 1 rubygems