Sha256: 9dec346f10b6ac40bdd9e3987256497e6ea464c2b6efa2790e1f742bc6508f95
Contents?: true
Size: 823 Bytes
Versions: 13
Compression:
Stored size: 823 Bytes
Contents
# typed: strict require('parlour') require('sorbet-rails/model_utils') module SorbetRails::ModelPlugins class Base < ::Parlour::Plugin extend T::Sig extend T::Helpers include SorbetRails::ModelUtils abstract! # convenient rename Parameter = ::Parlour::RbiGenerator::Parameter sig { override.returns(T.class_of(ActiveRecord::Base)) } attr_reader :model_class sig { returns(T::Set[String]) } attr_reader :available_classes sig { params( model_class: T.class_of(ActiveRecord::Base), available_classes: T::Set[String], ). void } def initialize(model_class, available_classes) @model_class = T.let(model_class, T.class_of(ActiveRecord::Base)) @available_classes = T.let(available_classes, T::Set[String]) end end end
Version data entries
13 entries across 13 versions & 1 rubygems