Sha256: 48b57301236720c989dc5cda4d3e0bd50986367c3bde6127f9d783aba38a36b4

Contents?: true

Size: 544 Bytes

Versions: 2

Compression:

Stored size: 544 Bytes

Contents

module Moceansdk
  module Modules
    module Voice

      class McBuilder
        def initialize
          @mc = []
        end

        def add(mc)
          unless mc.is_a? McObject::AbstractMc
            raise Moceansdk::Exceptions::MoceanError, 'mc_object must extend AbstractMc'
          end

          @mc.push(mc)
          self
        end

        def build
          converted = []
          @mc.each do |mc|
            converted.push(mc.get_request_data)
          end
          converted
        end
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
moceansdk-1.1.1 lib/moceansdk/modules/voice/mc_builder.rb
moceansdk-1.1.0 lib/moceansdk/modules/voice/mc_builder.rb