Class: LogStruct::Log::CarrierWave::Delete
- Inherits:
-
T::Struct
- Object
- T::Struct
- LogStruct::Log::CarrierWave::Delete
- Extended by:
- T::Sig
- Includes:
- Interfaces::CommonFields, Shared::SerializeCommon
- Defined in:
- lib/log_struct/log/carrierwave/delete.rb
Instance Attribute Summary collapse
-
#event ⇒ Event
readonly
Returns the value of prop
event. -
#extension ⇒ String?
readonly
Returns the value of prop
extension. -
#file_id ⇒ String
readonly
Returns the value of prop
file_id. -
#level ⇒ Level
readonly
Returns the value of prop
level. -
#model ⇒ String?
readonly
Returns the value of prop
model. -
#mount_point ⇒ String?
readonly
Returns the value of prop
mount_point. -
#source ⇒ Source::CarrierWave
readonly
Shared/common fields.
-
#storage ⇒ Symbol
readonly
Returns the value of prop
storage. -
#store_path ⇒ String?
readonly
Returns the value of prop
store_path. -
#timestamp ⇒ Time
readonly
Returns the value of prop
timestamp. -
#uploader ⇒ String?
readonly
Returns the value of prop
uploader. -
#version ⇒ String?
readonly
Returns the value of prop
version.
Instance Method Summary collapse
- #initialize(source: Source::CarrierWave, event: Event::Delete, timestamp:, level: Level::Info, storage:, file_id:, uploader: nil, model: nil, mount_point: nil, version: nil, store_path: nil, extension: nil) ⇒ void constructor
- #to_h ⇒ Hash{LogStruct::LogField => T.untyped}
Methods included from Shared::SerializeCommon
#as_json, #serialize, #serialize_common
Methods included from Interfaces::CommonFields
Constructor Details
#initialize(source: Source::CarrierWave, event: Event::Delete, timestamp:, level: Level::Info, storage:, file_id:, uploader: nil, model: nil, mount_point: nil, version: nil, store_path: nil, extension: nil) ⇒ void
|
|
# File '' const :source, Source::CarrierWave, default: Source::CarrierWave const :event, Event, default: Event::Delete const :timestamp, Time, factory: -> { Time.now } const :level, Level, default: Level::Info const :storage, Symbol const :file_id, String const :uploader, T.nilable(String), default: nil const :model, T.nilable(String), default: nil const :mount_point, T.nilable(String), default: nil const :version, T.nilable(String), default: nil const :store_path, T.nilable(String), default: nil const :extension, T.nilable(String), default: nil |
Instance Attribute Details
#event ⇒ Event (readonly)
Returns the value of prop event.
|
|
# File '' const :event, Event, default: Event::Delete |
#extension ⇒ String? (readonly)
Returns the value of prop extension.
|
|
# File '' const :extension, T.nilable(String), default: nil |
#file_id ⇒ String (readonly)
Returns the value of prop file_id.
|
|
# File '' const :file_id, String |
#level ⇒ Level (readonly)
Returns the value of prop level.
|
|
# File '' const :level, Level, default: Level::Info |
#model ⇒ String? (readonly)
Returns the value of prop model.
|
|
# File '' const :model, T.nilable(String), default: nil |
#mount_point ⇒ String? (readonly)
Returns the value of prop mount_point.
|
|
# File '' const :mount_point, T.nilable(String), default: nil |
#source ⇒ Source::CarrierWave (readonly)
Shared/common fields
|
|
# File '' const :source, Source::CarrierWave, default: Source::CarrierWave |
#storage ⇒ Symbol (readonly)
Returns the value of prop storage.
|
|
# File '' const :storage, Symbol |
#store_path ⇒ String? (readonly)
Returns the value of prop store_path.
|
|
# File '' const :store_path, T.nilable(String), default: nil |
#timestamp ⇒ Time (readonly)
Returns the value of prop timestamp.
|
|
# File '' const :timestamp, Time, factory: -> { Time.now } |
#uploader ⇒ String? (readonly)
Returns the value of prop uploader.
|
|
# File '' const :uploader, T.nilable(String), default: nil |
#version ⇒ String? (readonly)
Returns the value of prop version.
|
|
# File '' const :version, T.nilable(String), default: nil |
Instance Method Details
#to_h ⇒ Hash{LogStruct::LogField => T.untyped}
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/log_struct/log/carrierwave/delete.rb', line 46 def to_h h = T.let({}, T::Hash[LogStruct::LogField, T.untyped]) h[LogField::Storage] = storage h[LogField::FileId] = file_id h[LogField::Uploader] = uploader unless uploader.nil? h[LogField::Model] = model unless model.nil? h[LogField::MountPoint] = mount_point unless mount_point.nil? h[LogField::Version] = version unless version.nil? h[LogField::StorePath] = store_path unless store_path.nil? h[LogField::Extension] = extension unless extension.nil? h end |