Class: LogStruct::Log::Dotenv::Update
- Inherits:
-
T::Struct
- Object
- T::Struct
- LogStruct::Log::Dotenv::Update
- Extended by:
- T::Sig
- Includes:
- Interfaces::CommonFields, Shared::SerializeCommon
- Defined in:
- lib/log_struct/log/dotenv/update.rb
Instance Attribute Summary collapse
-
#event ⇒ Event
readonly
Returns the value of prop
event. -
#level ⇒ Level
readonly
Returns the value of prop
level. -
#source ⇒ Source::Dotenv
readonly
Shared/common fields.
-
#timestamp ⇒ Time
readonly
Returns the value of prop
timestamp. -
#vars ⇒ Array<String>
readonly
Event-specific fields.
Instance Method Summary collapse
- #initialize(source: Source::Dotenv, event: Event::Update, timestamp:, level: Level::Info, vars:) ⇒ 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::Dotenv, event: Event::Update, timestamp:, level: Level::Info, vars:) ⇒ void
|
|
# File '' const :source, Source::Dotenv, default: Source::Dotenv const :event, Event, default: Event::Update const :timestamp, Time, factory: -> { Time.now } const :level, Level, default: Level::Info const :vars, T::Array[String] |
Instance Attribute Details
#event ⇒ Event (readonly)
Returns the value of prop event.
|
|
# File '' const :event, Event, default: Event::Update |
#level ⇒ Level (readonly)
Returns the value of prop level.
|
|
# File '' const :level, Level, default: Level::Info |
#source ⇒ Source::Dotenv (readonly)
Shared/common fields
|
|
# File '' const :source, Source::Dotenv, default: Source::Dotenv |
#timestamp ⇒ Time (readonly)
Returns the value of prop timestamp.
|
|
# File '' const :timestamp, Time, factory: -> { Time.now } |
#vars ⇒ Array<String> (readonly)
Event-specific fields
|
|
# File '' const :vars, T::Array[String] |
Instance Method Details
#to_h ⇒ Hash{LogStruct::LogField => T.untyped}
40 41 42 43 44 |
# File 'lib/log_struct/log/dotenv/update.rb', line 40 def to_h h = T.let({}, T::Hash[LogStruct::LogField, T.untyped]) h[LogField::Vars] = vars h end |