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.3.23 lib/seahorse/model/api.rb
aws-sdk-core-2.11.175 lib/seahorse/model/api.rb
aws-sdk-core-2.11.174 lib/seahorse/model/api.rb
aws-sdk-core-2.11.173 lib/seahorse/model/api.rb
aws-sdk-core-2.11.172 lib/seahorse/model/api.rb
aws-sdk-core-2.11.171 lib/seahorse/model/api.rb
aws-sdk-core-2.11.170 lib/seahorse/model/api.rb
aws-sdk-core-2.11.169 lib/seahorse/model/api.rb
aws-sdk-core-2.11.168 lib/seahorse/model/api.rb
aws-sdk-core-2.11.167 lib/seahorse/model/api.rb
aws-sdk-core-2.11.166 lib/seahorse/model/api.rb
aws-sdk-core-2.11.165 lib/seahorse/model/api.rb
aws-sdk-core-2.11.164 lib/seahorse/model/api.rb
aws-sdk-core-2.11.163 lib/seahorse/model/api.rb
aws-sdk-core-2.11.162 lib/seahorse/model/api.rb
aws-sdk-core-2.11.161 lib/seahorse/model/api.rb
aws-sdk-core-2.11.160 lib/seahorse/model/api.rb
aws-sdk-core-2.11.159 lib/seahorse/model/api.rb
aws-sdk-core-2.11.158 lib/seahorse/model/api.rb
aws-sdk-core-2.11.157 lib/seahorse/model/api.rb