Class: Seahorse::Model::Shapes::Shape
- Inherits:
-
Object
- Object
- Seahorse::Model::Shapes::Shape
- Defined in:
- lib/seahorse/model/shapes.rb
Direct Known Subclasses
BlobShape, BooleanShape, FloatShape, IntegerShape, ListShape, MapShape, StringShape, StructureShape, TimestampShape
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#[](key) ⇒ Object
Gets metadata for the given ‘key`.
-
#[]=(key, value) ⇒ Object
Sets metadata for the given ‘key`.
-
#initialize ⇒ Shape
constructor
A new instance of Shape.
Constructor Details
#initialize ⇒ Shape
Returns a new instance of Shape.
60 61 62 |
# File 'lib/seahorse/model/shapes.rb', line 60 def initialize @metadata = {} end |
Instance Attribute Details
#documentation ⇒ String?
68 69 70 |
# File 'lib/seahorse/model/shapes.rb', line 68 def documentation @documentation end |
#name ⇒ String
65 66 67 |
# File 'lib/seahorse/model/shapes.rb', line 65 def name @name end |
Instance Method Details
#[](key) ⇒ Object
Gets metadata for the given ‘key`.
71 72 73 |
# File 'lib/seahorse/model/shapes.rb', line 71 def [](key) @metadata[key.to_s] end |
#[]=(key, value) ⇒ Object
Sets metadata for the given ‘key`.
76 77 78 |
# File 'lib/seahorse/model/shapes.rb', line 76 def []=(key, value) @metadata[key.to_s] = value end |