Class: LogStruct::Log::ActiveStorage::BaseFields

Inherits:
T::Struct
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/log_struct/log/active_storage.rb

Constant Summary collapse

Kwargs =
T.type_alias do
  {
    storage: Symbol,
    file_id: T.nilable(String)
  }
end

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(storage:, file_id: nil) ⇒ void

Parameters:

  • storage (Symbol)
  • file_id (String, nil) (defaults to: nil)


# File ''

const :storage, Symbol
const :file_id, T.nilable(String), default: nil

Instance Attribute Details

#file_id ⇒ String? (readonly)

Returns the value of prop file_id.

Returns:

  • (String, nil)


# File ''

const :file_id, T.nilable(String), default: nil

#storage ⇒ Symbol (readonly)

Returns the value of prop storage.

Returns:

  • (Symbol)


# File ''

const :storage, Symbol

Instance Method Details

#to_kwargs ⇒ Kwargs

Returns:



32
33
34
35
36
37
# File 'lib/log_struct/log/active_storage.rb', line 32

def to_kwargs
  {
    storage: storage,
    file_id: file_id
  }
end