Class: Cadenya::Types::BareMetadata
- Inherits:
-
Object
- Object
- Cadenya::Types::BareMetadata
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id: nil, name: nil) ⇒ BareMetadata
constructor
A new instance of BareMetadata.
- #to_h ⇒ Object
Constructor Details
#initialize(id: nil, name: nil) ⇒ BareMetadata
Returns a new instance of BareMetadata.
1011 1012 1013 1014 |
# File 'lib/cadenya/types.rb', line 1011 def initialize(id: nil, name: nil) @id = id @name = name end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
1009 1010 1011 |
# File 'lib/cadenya/types.rb', line 1009 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
1009 1010 1011 |
# File 'lib/cadenya/types.rb', line 1009 def name @name end |
Class Method Details
.from_json(data) ⇒ Object
1016 1017 1018 1019 1020 1021 |
# File 'lib/cadenya/types.rb', line 1016 def self.from_json(data) new( id: data["id"], name: data["name"], ) end |