class Seahorse::Model::Shapes::ShapeRef
Attributes
deprecated[RW]
@return [Boolean]
documentation[RW]
@return [String, nil]
location[RW]
@return [String, nil]
location_name[RW]
@return [String, nil]
required[RW]
@return [Boolean]
shape[RW]
@return [Shape]
Public Class Methods
new(options = {})
click to toggle source
# File lib/seahorse/model/shapes.rb, line 9 def initialize(options = {}) @metadata = {} @required = false @deprecated = false options.each do |key, value| if key == :metadata value.each do |k,v| self[k] = v end else send("#{key}=", value) end end end
Public Instance Methods
[](key)
click to toggle source
Gets metadata for the given `key`.
# File lib/seahorse/model/shapes.rb, line 43 def [](key) if @metadata.key?(key.to_s) @metadata[key.to_s] else @shape[key.to_s] end end
[]=(key, value)
click to toggle source
Sets metadata for the given `key`.
# File lib/seahorse/model/shapes.rb, line 52 def []=(key, value) @metadata[key.to_s] = value end