Class: Cadenya::Types::MemoryEntry
- Inherits:
-
Object
- Object
- Cadenya::Types::MemoryEntry
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#info ⇒ Object
readonly
Returns the value of attribute info.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: nil, spec: nil, info: nil) ⇒ MemoryEntry
constructor
A new instance of MemoryEntry.
- #to_h ⇒ Object
Constructor Details
#initialize(metadata: nil, spec: nil, info: nil) ⇒ MemoryEntry
Returns a new instance of MemoryEntry.
3054 3055 3056 3057 3058 |
# File 'lib/cadenya/types.rb', line 3054 def initialize(metadata: nil, spec: nil, info: nil) @metadata = @spec = spec @info = info end |
Instance Attribute Details
#info ⇒ Object (readonly)
Returns the value of attribute info.
3052 3053 3054 |
# File 'lib/cadenya/types.rb', line 3052 def info @info end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
3052 3053 3054 |
# File 'lib/cadenya/types.rb', line 3052 def @metadata end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
3052 3053 3054 |
# File 'lib/cadenya/types.rb', line 3052 def spec @spec end |
Class Method Details
.from_json(data) ⇒ Object
3060 3061 3062 3063 3064 3065 3066 |
# File 'lib/cadenya/types.rb', line 3060 def self.from_json(data) new( metadata: data["metadata"].nil? ? nil : Types::ResourceMetadata.from_json(data["metadata"]), spec: data["spec"].nil? ? nil : Types::MemoryEntrySpec.from_json(data["spec"]), info: data["info"].nil? ? nil : Types::MemoryEntryInfo.from_json(data["info"]), ) end |