Sha256: 482b567b5cb9857890b039baab634c1096e99fe39c64d8c40cbbc2dd6951e9ba

Contents?: true

Size: 784 Bytes

Versions: 546

Compression:

Stored size: 784 Bytes

Contents

module Seahorse
  module Model
    class Api

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

      # @return [String, nil]
      attr_accessor :version

      # @return [Hash]
      attr_accessor :metadata

      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

546 entries across 546 versions & 2 rubygems

Version Path
aws-sdk-core-2.11.96 lib/seahorse/model/api.rb
aws-sdk-core-2.11.95 lib/seahorse/model/api.rb
aws-sdk-core-2.11.94 lib/seahorse/model/api.rb
aws-sdk-core-2.11.93 lib/seahorse/model/api.rb
aws-sdk-core-2.11.92 lib/seahorse/model/api.rb
aws-sdk-core-2.11.91 lib/seahorse/model/api.rb
aws-sdk-core-2.11.90 lib/seahorse/model/api.rb
aws-sdk-core-2.11.89 lib/seahorse/model/api.rb
aws-sdk-core-2.11.88 lib/seahorse/model/api.rb
aws-sdk-core-2.11.87 lib/seahorse/model/api.rb
aws-sdk-core-2.11.86 lib/seahorse/model/api.rb
aws-sdk-core-2.11.85 lib/seahorse/model/api.rb
aws-sdk-core-2.11.84 lib/seahorse/model/api.rb
aws-sdk-core-2.11.83 lib/seahorse/model/api.rb
aws-sdk-core-2.11.82 lib/seahorse/model/api.rb
aws-sdk-core-2.11.81 lib/seahorse/model/api.rb
aws-sdk-core-2.11.80 lib/seahorse/model/api.rb
aws-sdk-core-2.11.79 lib/seahorse/model/api.rb
aws-sdk-core-2.11.78 lib/seahorse/model/api.rb
aws-sdk-core-2.11.77 lib/seahorse/model/api.rb