Class: Seahorse::Model::Shapes::Shape
- Inherits:
- 
      Object
      
        - Object
- Seahorse::Model::Shapes::Shape
 
- Defined in:
- lib/seahorse/model/shapes.rb
Direct Known Subclasses
BlobShape, BooleanShape, DocumentShape, 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(options = {})  ⇒ Shape 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Shape. 
Constructor Details
#initialize(options = {}) ⇒ Shape
Returns a new instance of Shape.
| 103 104 105 106 107 108 109 110 111 112 | # File 'lib/seahorse/model/shapes.rb', line 103 def initialize( = {}) @metadata = {} .each_pair do |key, value| if respond_to?("#{key}=") send("#{key}=", value) else self[key] = value end end end | 
Instance Attribute Details
#documentation ⇒ String?
| 118 119 120 | # File 'lib/seahorse/model/shapes.rb', line 118 def documentation @documentation end | 
#name ⇒ String
| 115 116 117 | # File 'lib/seahorse/model/shapes.rb', line 115 def name @name end | 
#union ⇒ Boolean
| 121 122 123 | # File 'lib/seahorse/model/shapes.rb', line 121 def union @union end | 
Instance Method Details
#[](key) ⇒ Object
Gets metadata for the given ‘key`.
| 124 125 126 | # File 'lib/seahorse/model/shapes.rb', line 124 def [](key) @metadata[key.to_s] end | 
#[]=(key, value) ⇒ Object
Sets metadata for the given ‘key`.
| 129 130 131 | # File 'lib/seahorse/model/shapes.rb', line 129 def []=(key, value) @metadata[key.to_s] = value end |