Sha256: eef0c1701b217e83e3a108a11d162c7900d1ffea970330a56c9359c32292c81e
Contents?: true
Size: 874 Bytes
Versions: 10
Compression:
Stored size: 874 Bytes
Contents
module Aws module Api # Visits every shape for every operation in an API model. module Visitor include Seahorse::Model::Shapes def each_shape(api, &block) api.operations.values.each do |operation| visit_shape(:input, operation.input, &block) visit_shape(:output, operation.output, &block) end end def visit_shape(context, shape, &block) yield(context, shape) case shape when StructureShape shape.members.each do |member_name, member_shape| visit_shape(member_name, member_shape, &block) end when MapShape visit_shape(:map_key, shape.keys, &block) visit_shape(:map_value, shape.members, &block) when ListShape visit_shape(:list_member, shape.members, &block) end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems