You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Seahorse::Model::Shapes::Shape

Inherits:
Object
  • Object
show all
Defined in:
gems/aws-sdk-core/lib/seahorse/model/shapes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Shape

Returns a new instance of Shape



96
97
98
99
100
101
102
103
104
105
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 96

def initialize(options = {})
  @metadata = {}
  options.each_pair do |key, value|
    if respond_to?("#{key}=")
      send("#{key}=", value)
    else
      self[key] = value
    end
  end
end

Instance Attribute Details

#documentationString?

Returns:

  • (String, nil)


111
112
113
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 111

def documentation
  @documentation
end

#nameString

Returns:

  • (String)


108
109
110
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 108

def name
  @name
end

Instance Method Details

#[](key) ⇒ Object

Gets metadata for the given key.



114
115
116
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 114

def [](key)
  @metadata[key.to_s]
end

#[]=(key, value) ⇒ Object

Sets metadata for the given key.



119
120
121
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 119

def []=(key, value)
  @metadata[key.to_s] = value
end