Module: Tapioca::Compilers::Dsl::ParamHelper
- Extended by:
- T::Sig
- Included in:
- ActiveRecordRelations::RelationGenerator, Base
- Defined in:
- lib/tapioca/compilers/dsl/param_helper.rb
Instance Method Summary collapse
- #create_block_param(name, type:) ⇒ Object
- #create_kw_opt_param(name, type:, default:) ⇒ Object
- #create_kw_param(name, type:) ⇒ Object
- #create_kw_rest_param(name, type:) ⇒ Object
- #create_opt_param(name, type:, default:) ⇒ Object
- #create_param(name, type:) ⇒ Object
- #create_rest_param(name, type:) ⇒ Object
- #create_typed_param(param, type) ⇒ Object
Instance Method Details
#create_block_param(name, type:) ⇒ Object
41 42 43 |
# File 'lib/tapioca/compilers/dsl/param_helper.rb', line 41 def create_block_param(name, type:) create_typed_param(RBI::BlockParam.new(name), type) end |
#create_kw_opt_param(name, type:, default:) ⇒ Object
31 32 33 |
# File 'lib/tapioca/compilers/dsl/param_helper.rb', line 31 def create_kw_opt_param(name, type:, default:) create_typed_param(RBI::KwOptParam.new(name, default), type) end |
#create_kw_param(name, type:) ⇒ Object
26 27 28 |
# File 'lib/tapioca/compilers/dsl/param_helper.rb', line 26 def create_kw_param(name, type:) create_typed_param(RBI::KwParam.new(name), type) end |
#create_kw_rest_param(name, type:) ⇒ Object
36 37 38 |
# File 'lib/tapioca/compilers/dsl/param_helper.rb', line 36 def create_kw_rest_param(name, type:) create_typed_param(RBI::KwRestParam.new(name), type) end |
#create_opt_param(name, type:, default:) ⇒ Object
16 17 18 |
# File 'lib/tapioca/compilers/dsl/param_helper.rb', line 16 def create_opt_param(name, type:, default:) create_typed_param(RBI::OptParam.new(name, default), type) end |
#create_param(name, type:) ⇒ Object
11 12 13 |
# File 'lib/tapioca/compilers/dsl/param_helper.rb', line 11 def create_param(name, type:) create_typed_param(RBI::Param.new(name), type) end |
#create_rest_param(name, type:) ⇒ Object
21 22 23 |
# File 'lib/tapioca/compilers/dsl/param_helper.rb', line 21 def create_rest_param(name, type:) create_typed_param(RBI::RestParam.new(name), type) end |
#create_typed_param(param, type) ⇒ Object
46 47 48 |
# File 'lib/tapioca/compilers/dsl/param_helper.rb', line 46 def create_typed_param(param, type) RBI::TypedParam.new(param: param, type: type) end |