class Seahorse::Model::Shapes::ShapeRef
Attributes
deprecated[RW]
@return [Boolean]
documentation[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 55 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 64 def []=(key, value) @metadata[key.to_s] = value end
location()
click to toggle source
@return [String, nil]
# File lib/seahorse/model/shapes.rb, line 37 def location @location || (shape && shape[:location]) end
location=(location)
click to toggle source
# File lib/seahorse/model/shapes.rb, line 41 def location= location @location = location end
location_name()
click to toggle source
@return [String, nil]
# File lib/seahorse/model/shapes.rb, line 46 def location_name @location_name || (shape && shape[:location_name]) end
location_name=(location_name)
click to toggle source
# File lib/seahorse/model/shapes.rb, line 50 def location_name= location_name @location_name = location_name end