Module: SorbetBaml::StructExtensions
- Extended by:
- T::Sig
- Defined in:
- lib/sorbet_baml/struct_extensions.rb
Overview
Extensions to add BAML conversion methods to T::Struct
Instance Method Summary collapse
Instance Method Details
#baml_type_definition(options = {}) ⇒ Object
19 20 21 |
# File 'lib/sorbet_baml/struct_extensions.rb', line 19 def baml_type_definition( = {}) SorbetBaml::Converter.from_struct(T.cast(self, T.class_of(T::Struct)), ) end |
#to_baml(options = {}) ⇒ Object
13 14 15 |
# File 'lib/sorbet_baml/struct_extensions.rb', line 13 def to_baml( = {}) baml_type_definition() end |