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



72
73
74
75
76
77
78
79
80
81
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 72

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)


87
88
89
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 87

def documentation
  @documentation
end

#nameString

Returns:

  • (String)


84
85
86
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 84

def name
  @name
end

Instance Method Details

#[](key) ⇒ Object

Gets metadata for the given key.



90
91
92
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 90

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

#[]=(key, value) ⇒ Object

Sets metadata for the given key.



95
96
97
# File 'gems/aws-sdk-core/lib/seahorse/model/shapes.rb', line 95

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