Class: Handinger::Models::Worker::Output::Content

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/handinger/models/worker.rb

Defined Under Namespace

Modules: Type

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(text:, type:) ⇒ Object

Parameters:



164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# File 'lib/handinger/models/worker.rb', line 164

class Content < Handinger::Internal::Type::BaseModel
  # @!attribute text
  #
  #   @return [String]
  required :text, String

  # @!attribute type
  #
  #   @return [Symbol, Handinger::Models::Worker::Output::Content::Type]
  required :type, enum: -> { Handinger::Worker::Output::Content::Type }

  # @!method initialize(text:, type:)
  #   @param text [String]
  #   @param type [Symbol, Handinger::Models::Worker::Output::Content::Type]

  # @see Handinger::Models::Worker::Output::Content#type
  module Type
    extend Handinger::Internal::Type::Enum

    OUTPUT_TEXT = :output_text

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#textString

Returns:

  • (String)


168
# File 'lib/handinger/models/worker.rb', line 168

required :text, String

#typeSymbol, Handinger::Models::Worker::Output::Content::Type



173
# File 'lib/handinger/models/worker.rb', line 173

required :type, enum: -> { Handinger::Worker::Output::Content::Type }