Class: Seahorse::Model::ShapeMap Private
- Inherits:
-
Object
- Object
- Seahorse::Model::ShapeMap
- Defined in:
- lib/seahorse/model/shape_map.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #definitions ⇒ Hash readonly private
Instance Method Summary collapse
-
#initialize(shape_defs = {}) ⇒ ShapeMap
constructor
private
A new instance of ShapeMap.
- #shape(shape_ref) ⇒ Shapes::Shape private
- #shape_names ⇒ Array<String> private
Constructor Details
#initialize(shape_defs = {}) ⇒ ShapeMap
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ShapeMap.
9 10 11 12 |
# File 'lib/seahorse/model/shape_map.rb', line 9 def initialize(shape_defs = {}) @definitions = shape_defs @shapes = {} end |
Instance Attribute Details
#definitions ⇒ Hash (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
15 16 17 |
# File 'lib/seahorse/model/shape_map.rb', line 15 def definitions @definitions end |
Instance Method Details
#shape(shape_ref) ⇒ Shapes::Shape
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22 23 24 |
# File 'lib/seahorse/model/shape_map.rb', line 22 def shape(shape_ref) @shapes[shape_ref] ||= build_shape(shape_ref) end |
#shape_names ⇒ Array<String>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
27 28 29 |
# File 'lib/seahorse/model/shape_map.rb', line 27 def shape_names @definitions.keys end |