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.17.4 lib/recurly/resource/errors.rb
recurly-2.17.3 lib/recurly/resource/errors.rb
recurly-2.17.2 lib/recurly/resource/errors.rb
recurly-2.17.1 lib/recurly/resource/errors.rb
recurly-2.17.0 lib/recurly/resource/errors.rb
recurly-2.16.2 lib/recurly/resource/errors.rb
recurly-2.16.1 lib/recurly/resource/errors.rb
recurly-2.16.0 lib/recurly/resource/errors.rb
recurly-2.15.4 lib/recurly/resource/errors.rb
recurly-2.15.3 lib/recurly/resource/errors.rb
recurly-2.14.1 lib/recurly/resource/errors.rb
recurly-2.13.1 lib/recurly/resource/errors.rb
recurly-2.12.2 lib/recurly/resource/errors.rb
recurly-2.11.4 lib/recurly/resource/errors.rb
recurly-2.10.5 lib/recurly/resource/errors.rb
recurly-2.9.3 lib/recurly/resource/errors.rb
recurly-2.8.3 lib/recurly/resource/errors.rb
recurly-2.7.9 lib/recurly/resource/errors.rb
recurly-2.6.4 lib/recurly/resource/errors.rb
recurly-2.5.5 lib/recurly/resource/errors.rb