Class: ActiveAgent::Providers::OpenRouter::Requests::Plugins::PdfConfigType
- Inherits:
-
ActiveModel::Type::Value
- Object
- ActiveModel::Type::Value
- ActiveAgent::Providers::OpenRouter::Requests::Plugins::PdfConfigType
- Defined in:
- lib/active_agent/providers/open_router/requests/plugins/_types.rb
Overview
Type for PdfConfig
Instance Method Summary collapse
Instance Method Details
#cast(value) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/active_agent/providers/open_router/requests/plugins/_types.rb', line 12 def cast(value) case value when PdfConfig value when Hash PdfConfig.new(**value.deep_symbolize_keys) when nil nil else raise ArgumentError, "Cannot cast #{value.class} to PdfConfig" end end |
#deserialize(value) ⇒ Object
38 39 40 |
# File 'lib/active_agent/providers/open_router/requests/plugins/_types.rb', line 38 def deserialize(value) cast(value) end |
#serialize(value) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/active_agent/providers/open_router/requests/plugins/_types.rb', line 25 def serialize(value) case value when PdfConfig value.serialize when Hash value when nil nil else raise ArgumentError, "Cannot serialize #{value.class}" end end |