Module: SorbetTyped::Props
- Extended by:
- T::Helpers, T::Sig
- Includes:
- Kernel, T::Props, T::Props::Constructor
- Defined in:
- lib/sorbet_typed/props.rb,
lib/sorbet_typed/props/version.rb,
lib/sorbet_typed/props/without_init_param_and_no_default_plugin.rb
Overview
an abstraction module to be included in any class to make the sorbet props interface usable. It's just a wrapper around T::Props and T::Props::Constructor. It's also the ancestor the custom tapioca compiler looks for when generating initializer type annotation rbis.
:reek:ModuleInitialize -- we accept this here. This module defines an initialize method via T::Props::Constructor nonetheless, we only extend it. It shouldn't really be used with other initializers anyway.
Defined Under Namespace
Modules: ClassMethods Classes: WithoutInitParamAndNoDefaultPlugin
Constant Summary collapse
- MINIMUM_SUPPORTED_PHLEX_VERSION =
Phlex predates its current Phlex::SGML-based architecture entirely before 1.0 (confirmed by inspecting phlex 0.5.3's source: no Phlex::SGML class, different Rails-view-coupled design) - this is the only place this version literal is written; tested_gem_versions.yml references it by name via
min_constant, never duplicates it. '1.0.0'- VERSION =
'1.5.5'
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
34 35 36 37 38 |
# File 'lib/sorbet_typed/props.rb', line 34 def self.included(base) super check_phlex_compatibility!(base) patch_phlex_method_added!(base) end |
Instance Method Details
#initialize(hash = {}) ⇒ Object
281 282 283 284 285 286 |
# File 'lib/sorbet_typed/props.rb', line 281 def initialize(hash = {}) reject_unknown_parameters(hash) super post_props_initialize end |