Sha256: 96396c01cfbc0010c9d2dc48ab50d966e1fc46005df75b2b9d4f705bcc1ed725

Contents?: true

Size: 852 Bytes

Versions: 30

Compression:

Stored size: 852 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

      def inspect(*args)
        "#<#{self.class.name}>"
      end

    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
aws-sdk-core-3.7.0 lib/seahorse/model/api.rb
aws-sdk-core-3.6.1 lib/seahorse/model/api.rb
aws-sdk-core-3.6.0 lib/seahorse/model/api.rb
aws-sdk-core-3.5.0 lib/seahorse/model/api.rb
aws-sdk-core-3.4.0 lib/seahorse/model/api.rb
aws-sdk-core-3.3.1 lib/seahorse/model/api.rb
aws-sdk-core-3.3.0 lib/seahorse/model/api.rb
aws-sdk-core-3.2.1 lib/seahorse/model/api.rb
aws-sdk-core-3.2.0 lib/seahorse/model/api.rb
aws-sdk-core-3.1.0 lib/seahorse/model/api.rb
aws-sdk-core-3.0.0 lib/seahorse/model/api.rb
aws-sdk-core-3.0.0.rc20 lib/seahorse/model/api.rb
aws-sdk-core-3.0.0.rc19 lib/seahorse/model/api.rb
aws-sdk-core-3.0.0.rc18 lib/seahorse/model/api.rb
aws-sdk-core-3.0.0.rc17 lib/seahorse/model/api.rb
aws-sdk-core-3.0.0.rc16 lib/seahorse/model/api.rb
aws-sdk-core-3.0.0.rc15 lib/seahorse/model/api.rb
aws-sdk-core-3.0.0.rc14 lib/seahorse/model/api.rb
aws-sdk-core-3.0.0.rc13 lib/seahorse/model/api.rb
aws-sdk-core-3.0.0.rc12 lib/seahorse/model/api.rb