Class: Cadenya::Types::Subject
- Inherits:
-
Object
- Object
- Cadenya::Types::Subject
- 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.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: nil, info: nil) ⇒ Subject
constructor
A new instance of Subject.
- #to_h ⇒ Object
Constructor Details
#initialize(metadata: nil, info: nil) ⇒ Subject
Returns a new instance of Subject.
5279 5280 5281 5282 |
# File 'lib/cadenya/types.rb', line 5279 def initialize(metadata: nil, info: nil) @metadata = @info = info end |
Instance Attribute Details
#info ⇒ Object (readonly)
Returns the value of attribute info.
5277 5278 5279 |
# File 'lib/cadenya/types.rb', line 5277 def info @info end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
5277 5278 5279 |
# File 'lib/cadenya/types.rb', line 5277 def @metadata end |
Class Method Details
.from_json(data) ⇒ Object
5284 5285 5286 5287 5288 5289 |
# File 'lib/cadenya/types.rb', line 5284 def self.from_json(data) new( metadata: data["metadata"].nil? ? nil : Types::ResourceMetadata.from_json(data["metadata"]), info: data["info"].nil? ? nil : Types::SubjectInfo.from_json(data["info"]), ) end |