Class: Cadenya::Types::MemoryEntryDetail
- Inherits:
-
Object
- Object
- Cadenya::Types::MemoryEntryDetail
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#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, content: nil) ⇒ MemoryEntryDetail
constructor
A new instance of MemoryEntryDetail.
- #to_h ⇒ Object
Constructor Details
#initialize(metadata: nil, spec: nil, info: nil, content: nil) ⇒ MemoryEntryDetail
Returns a new instance of MemoryEntryDetail.
3092 3093 3094 3095 3096 3097 |
# File 'lib/cadenya/types.rb', line 3092 def initialize(metadata: nil, spec: nil, info: nil, content: nil) @metadata = @spec = spec @info = info @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
3090 3091 3092 |
# File 'lib/cadenya/types.rb', line 3090 def content @content end |
#info ⇒ Object (readonly)
Returns the value of attribute info.
3090 3091 3092 |
# File 'lib/cadenya/types.rb', line 3090 def info @info end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
3090 3091 3092 |
# File 'lib/cadenya/types.rb', line 3090 def @metadata end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
3090 3091 3092 |
# File 'lib/cadenya/types.rb', line 3090 def spec @spec end |
Class Method Details
.from_json(data) ⇒ Object
3099 3100 3101 3102 3103 3104 3105 3106 |
# File 'lib/cadenya/types.rb', line 3099 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"]), content: data["content"], ) end |