Class: Parse::Core::EmbedManaged::EmbedDirective
- Inherits:
-
Struct
- Object
- Struct
- Parse::Core::EmbedManaged::EmbedDirective
- Defined in:
- lib/parse/model/core/embed_managed.rb
Overview
Frozen value-object capturing one embed or embed_image
declaration. Stored on the owning class under
embed_directives[into] and passed to
recompute_embedding! from the per-class
before_save callback.
modality is nil (treated as :text) for embed-declared
directives and :image for embed_image. The image path
routes through Parse::Embeddings.validate_image_url! and
Provider#embed_image rather than Provider#embed_text;
digest tracking is over the file URL String rather than the
concatenated source text.
allow_insecure is forwarded to validate_image_url! for
image directives only; ignored for text.
Instance Attribute Summary collapse
-
#allow_insecure ⇒ Object
Returns the value of attribute allow_insecure.
-
#digest_field ⇒ Object
Returns the value of attribute digest_field.
-
#input_type ⇒ Object
Returns the value of attribute input_type.
-
#into ⇒ Object
Returns the value of attribute into.
-
#modality ⇒ Object
Returns the value of attribute modality.
-
#provider_name ⇒ Object
Returns the value of attribute provider_name.
-
#sources ⇒ Object
Returns the value of attribute sources.
Instance Method Summary collapse
Instance Attribute Details
#allow_insecure ⇒ Object
Returns the value of attribute allow_insecure
106 107 108 |
# File 'lib/parse/model/core/embed_managed.rb', line 106 def allow_insecure @allow_insecure end |
#digest_field ⇒ Object
Returns the value of attribute digest_field
106 107 108 |
# File 'lib/parse/model/core/embed_managed.rb', line 106 def digest_field @digest_field end |
#input_type ⇒ Object
Returns the value of attribute input_type
106 107 108 |
# File 'lib/parse/model/core/embed_managed.rb', line 106 def input_type @input_type end |
#into ⇒ Object
Returns the value of attribute into
106 107 108 |
# File 'lib/parse/model/core/embed_managed.rb', line 106 def into @into end |
#modality ⇒ Object
Returns the value of attribute modality
106 107 108 |
# File 'lib/parse/model/core/embed_managed.rb', line 106 def modality @modality end |
#provider_name ⇒ Object
Returns the value of attribute provider_name
106 107 108 |
# File 'lib/parse/model/core/embed_managed.rb', line 106 def provider_name @provider_name end |
#sources ⇒ Object
Returns the value of attribute sources
106 107 108 |
# File 'lib/parse/model/core/embed_managed.rb', line 106 def sources @sources end |
Instance Method Details
#freeze ⇒ Object
111 112 113 114 |
# File 'lib/parse/model/core/embed_managed.rb', line 111 def freeze sources.freeze super end |
#image? ⇒ Boolean
116 117 118 |
# File 'lib/parse/model/core/embed_managed.rb', line 116 def image? modality == :image end |