Class: Rubino::Attachments::Classification
- Inherits:
-
Struct
- Object
- Struct
- Rubino::Attachments::Classification
- Defined in:
- lib/rubino/attachments/classification.rb
Overview
Result of Attachments::Classify.call. Pure data; no behaviour.
path: frozen realpath captured once (TOCTOU), or original if unsafe
kind: :image | :text | :document | :archive | :binary
mime: Marcel content-sniffed type
safe: false => safety pipeline rejected it; caller skips + warns
reason: human-readable why-unsafe / how-classified
Instance Attribute Summary collapse
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#mime ⇒ Object
Returns the value of attribute mime.
-
#path ⇒ Object
Returns the value of attribute path.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#safe ⇒ Object
Returns the value of attribute safe.
-
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
Instance Attribute Details
#kind ⇒ Object
Returns the value of attribute kind
11 12 13 |
# File 'lib/rubino/attachments/classification.rb', line 11 def kind @kind end |
#mime ⇒ Object
Returns the value of attribute mime
11 12 13 |
# File 'lib/rubino/attachments/classification.rb', line 11 def mime @mime end |
#path ⇒ Object
Returns the value of attribute path
11 12 13 |
# File 'lib/rubino/attachments/classification.rb', line 11 def path @path end |
#reason ⇒ Object
Returns the value of attribute reason
11 12 13 |
# File 'lib/rubino/attachments/classification.rb', line 11 def reason @reason end |
#safe ⇒ Object
Returns the value of attribute safe
11 12 13 |
# File 'lib/rubino/attachments/classification.rb', line 11 def safe @safe end |
#size_bytes ⇒ Object
Returns the value of attribute size_bytes
11 12 13 |
# File 'lib/rubino/attachments/classification.rb', line 11 def size_bytes @size_bytes end |