Sha256: 0d0dd1c36422c71ed73f5142bc418b7fe4b7a2bc86e1d9f2e705e358cc43204c

Contents?: true

Size: 327 Bytes

Versions: 42

Compression:

Stored size: 327 Bytes

Contents

module Videojuicer
  module Resource
    class Errors < Hash
      
      def initialize(error_hash)
        self.merge!(error_hash)
      end
      
      def on(key)
        o = self[key.to_s]    
        o = (o.is_a?(Array))? o.uniq : [o]
        return (o.compact.empty?)? nil : o.compact
      end
      
    end
  end
end

Version data entries

42 entries across 42 versions & 2 rubygems

Version Path
videojuicer-vj-sdk-0.1.0 lib/videojuicer/resource/errors.rb
videojuicer-vj-sdk-0.1.1 lib/videojuicer/resource/errors.rb
videojuicer-vj-sdk-0.1.12 lib/videojuicer/resource/errors.rb
videojuicer-vj-sdk-0.1.3 lib/videojuicer/resource/errors.rb
videojuicer-vj-sdk-0.1.4 lib/videojuicer/resource/errors.rb
videojuicer-vj-sdk-0.1.5 lib/videojuicer/resource/errors.rb
vj-sdk-0.8.2 lib/videojuicer/resource/errors.rb
vj-sdk-0.8.0.1 lib/videojuicer/resource/errors.rb
vj-sdk-0.7.14 lib/videojuicer/resource/errors.rb
vj-sdk-0.7.13 lib/videojuicer/resource/errors.rb
vj-sdk-0.7.11 lib/videojuicer/resource/errors.rb
vj-sdk-0.7.10 lib/videojuicer/resource/errors.rb
vj-sdk-0.7.9 lib/videojuicer/resource/errors.rb
vj-sdk-0.7.8 lib/videojuicer/resource/errors.rb
vj-sdk-0.7.7 lib/videojuicer/resource/errors.rb
vj-sdk-0.7.6 lib/videojuicer/resource/errors.rb
vj-sdk-0.7.5 lib/videojuicer/resource/errors.rb
vj-sdk-0.7.4 lib/videojuicer/resource/errors.rb
vj-sdk-0.7.3 lib/videojuicer/resource/errors.rb
vj-sdk-0.7.2 lib/videojuicer/resource/errors.rb