Class: Tapioca::Dsl::Helpers::ActiveRecordColumnTypeHelper
- Inherits:
-
Object
- Object
- Tapioca::Dsl::Helpers::ActiveRecordColumnTypeHelper
- Extended by:
- T::Sig
- Includes:
- RBIHelper
- Defined in:
- lib/tapioca/dsl/helpers/active_record_column_type_helper.rb
Constant Summary
Constants included from SorbetHelper
SorbetHelper::FEATURE_REQUIREMENTS, SorbetHelper::SORBET_BIN, SorbetHelper::SORBET_EXE_PATH_ENV_VAR, SorbetHelper::SORBET_GEM_SPEC, SorbetHelper::SORBET_PAYLOAD_URL, SorbetHelper::SPOOM_CONTEXT
Instance Method Summary collapse
-
#initialize(constant) ⇒ ActiveRecordColumnTypeHelper
constructor
A new instance of ActiveRecordColumnTypeHelper.
- #type_for(attribute_name, column_name = attribute_name) ⇒ Object
Methods included from RBIHelper
#as_nilable_type, #create_block_param, #create_kw_opt_param, #create_kw_param, #create_kw_rest_param, #create_opt_param, #create_param, #create_rest_param, #create_typed_param, #sanitize_signature_types, serialize_type_variable, #valid_method_name?, #valid_parameter_name?
Methods included from SorbetHelper
#sorbet, #sorbet_path, #sorbet_supports?
Constructor Details
#initialize(constant) ⇒ ActiveRecordColumnTypeHelper
Returns a new instance of ActiveRecordColumnTypeHelper.
12 13 14 |
# File 'lib/tapioca/dsl/helpers/active_record_column_type_helper.rb', line 12 def initialize(constant) @constant = constant end |
Instance Method Details
#type_for(attribute_name, column_name = attribute_name) ⇒ Object
17 18 19 20 21 |
# File 'lib/tapioca/dsl/helpers/active_record_column_type_helper.rb', line 17 def type_for(attribute_name, column_name = attribute_name) return id_type if attribute_name == "id" column_type_for(column_name) end |