Sha256: 2b8631ee52568e797f0cd460d2c2c8dd66dba97b92f174ea4d3515cef6bed992

Contents?: true

Size: 554 Bytes

Versions: 44

Compression:

Stored size: 554 Bytes

Contents

module Bandwidth 
  module Voice 
    module XmlVerb
      def initialize(data = nil)
        @data = (data || {}).clone()
      end

      def method_missing(name, *args, &block)
        if name[name.size - 1] == '='
          @data[name[0..-2].to_sym] = args[0]
        else
          @data[name]
        end
      end

      def compact_hash(hash)
        hash.inject({}) do |new_hash, (k,v)|
          if !v.nil?
            new_hash[k] = v.class == Hash ? compact_hash(v) : v
          end
          new_hash
        end
      end
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
bandwidth-sdk-10.5.0 lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
bandwidth-sdk-10.4.0 lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
bandwidth-sdk-10.3.0 lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
bandwidth-sdk-10.2.0 lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
bandwidth-sdk-10.1.0 lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
bandwidth-sdk-10.0.0 lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
bandwidth-sdk-9.4.1 lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
bandwidth-sdk-9.4.0 lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
bandwidth-sdk-9.3.0 lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
bandwidth-sdk-9.2.0 lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
bandwidth-sdk-9.1.2 lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
bandwidth-sdk-9.1.1 lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
bandwidth-sdk-9.1.0 lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
bandwidth-sdk-9.0.0 lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
bandwidth-sdk-8.0.0 lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
bandwidth-sdk-7.1.0 lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
bandwidth-sdk-7.0.0 lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
bandwidth-sdk-6.2.0 lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
bandwidth-sdk-6.1.0 lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
bandwidth-sdk-6.0.0 lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb