Sha256: 3e276f18f51db0c7bcad8eefd62046bb5f0df98d67e91b6d4d1d93764a9df29c

Contents?: true

Size: 411 Bytes

Versions: 162

Compression:

Stored size: 411 Bytes

Contents

module Recurly
  class Resource
    class Errors < Hash
      def [] key
        super key.to_s
      end

      def []= key, value
        super key.to_s, value
      end

      def full_messages
        map { |attribute, messages|
          attribute_name = attribute.capitalize.gsub('_', ' ')
          messages.map { |message| "#{attribute_name} #{message}." }
        }.flatten
      end
    end
  end
end

Version data entries

162 entries across 162 versions & 1 rubygems

Version Path
recurly-2.20.3 lib/recurly/resource/errors.rb
recurly-2.20.2 lib/recurly/resource/errors.rb
recurly-2.20.1 lib/recurly/resource/errors.rb
recurly-2.20.0 lib/recurly/resource/errors.rb
recurly-2.19.13 lib/recurly/resource/errors.rb
recurly-2.19.12 lib/recurly/resource/errors.rb
recurly-2.19.11 lib/recurly/resource/errors.rb
recurly-2.19.10 lib/recurly/resource/errors.rb
recurly-2.19.9 lib/recurly/resource/errors.rb
recurly-2.19.8 lib/recurly/resource/errors.rb
recurly-2.19.7 lib/recurly/resource/errors.rb
recurly-2.19.6 lib/recurly/resource/errors.rb
recurly-2.19.5 lib/recurly/resource/errors.rb
recurly-2.19.4 lib/recurly/resource/errors.rb
recurly-2.19.3 lib/recurly/resource/errors.rb
recurly-2.19.2 lib/recurly/resource/errors.rb
recurly-2.19.1 lib/recurly/resource/errors.rb
recurly-2.19.0 lib/recurly/resource/errors.rb
recurly-2.18.34 lib/recurly/resource/errors.rb
recurly-2.18.33 lib/recurly/resource/errors.rb