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