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.



100
101
102
103
104
105
106
107
108
109
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 100

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)


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

def documentation
  @documentation
end

#nameString

Returns:

  • (String)


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

def name
  @name
end

Instance Method Details

#[](key) ⇒ Object

Gets metadata for the given key.



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

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

#[]=(key, value) ⇒ Object

Sets metadata for the given key.



123
124
125
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 123

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