Class: Seahorse::Model::Shapes::UnionShape

Inherits:
StructureShape show all
Defined in:
lib/seahorse/model/shapes.rb

Instance Attribute Summary

Attributes inherited from StructureShape

#required, #struct_class

Attributes inherited from Shape

#documentation, #name, #union

Instance Method Summary collapse

Methods inherited from StructureShape

#add_member, #member, #member?, #member_by_location_name, #member_names, #members

Methods inherited from Shape

#[], #[]=

Constructor Details

#initialize(options = {}) ⇒ UnionShape

Returns a new instance of UnionShape.


274
275
276
277
# File 'lib/seahorse/model/shapes.rb', line 274

def initialize(options = {})
  @member_subclasses = {}
  super options.merge(union: true)
end

Instance Method Details

#add_member_subclass(member, subclass) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


285
286
287
# File 'lib/seahorse/model/shapes.rb', line 285

def add_member_subclass(member, subclass)
  @member_subclasses[member] = subclass
end

#member_subclass(member) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


280
281
282
# File 'lib/seahorse/model/shapes.rb', line 280

def member_subclass(member)
  @member_subclasses[member]
end