Sha256: b440c221bb37d298e40ba807bb57a837445e9f6bc581f8c52f7f214583e0b1aa

Contents?: true

Size: 888 Bytes

Versions: 451

Compression:

Stored size: 888 Bytes

Contents

module Seahorse
  module Model
    class Api

      def initialize
        @metadata = {}
        @operations = {}
        @endpoint_operation = nil
      end

      # @return [String, nil]
      attr_accessor :version

      # @return [Hash]
      attr_accessor :metadata

      # @return [Symbol|nil]
      attr_accessor :endpoint_operation

      def operations(&block)
        if block_given?
          @operations.each(&block)
        else
          @operations.enum_for(:each)
        end
      end

      def operation(name)
        if @operations.key?(name.to_sym)
          @operations[name.to_sym]
        else
          raise ArgumentError, "unknown operation #{name.inspect}"
        end
      end

      def operation_names
        @operations.keys
      end

      def add_operation(name, operation)
        @operations[name.to_sym] = operation
      end

    end
  end
end

Version data entries

451 entries across 451 versions & 1 rubygems

Version Path
aws-sdk-core-2.11.632 lib/seahorse/model/api.rb
aws-sdk-core-2.11.631 lib/seahorse/model/api.rb
aws-sdk-core-2.11.630 lib/seahorse/model/api.rb
aws-sdk-core-2.11.629 lib/seahorse/model/api.rb
aws-sdk-core-2.11.628 lib/seahorse/model/api.rb
aws-sdk-core-2.11.627 lib/seahorse/model/api.rb
aws-sdk-core-2.11.626 lib/seahorse/model/api.rb
aws-sdk-core-2.11.625 lib/seahorse/model/api.rb
aws-sdk-core-2.11.624 lib/seahorse/model/api.rb
aws-sdk-core-2.11.623 lib/seahorse/model/api.rb
aws-sdk-core-2.11.622 lib/seahorse/model/api.rb
aws-sdk-core-2.11.621 lib/seahorse/model/api.rb
aws-sdk-core-2.11.620 lib/seahorse/model/api.rb
aws-sdk-core-2.11.619 lib/seahorse/model/api.rb
aws-sdk-core-2.11.618 lib/seahorse/model/api.rb
aws-sdk-core-2.11.617 lib/seahorse/model/api.rb
aws-sdk-core-2.11.616 lib/seahorse/model/api.rb
aws-sdk-core-2.11.615 lib/seahorse/model/api.rb
aws-sdk-core-2.11.614 lib/seahorse/model/api.rb
aws-sdk-core-2.11.613 lib/seahorse/model/api.rb