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.4.12 lib/recurly/resource/errors.rb
recurly-2.3.11 lib/recurly/resource/errors.rb
recurly-2.2.6 lib/recurly/resource/errors.rb
recurly-2.1.12 lib/recurly/resource/errors.rb
recurly-2.15.2 lib/recurly/resource/errors.rb
recurly-2.15.1 lib/recurly/resource/errors.rb
recurly-2.15.0 lib/recurly/resource/errors.rb
recurly-2.14.0 lib/recurly/resource/errors.rb
recurly-2.13.0 lib/recurly/resource/errors.rb
recurly-2.12.1 lib/recurly/resource/errors.rb
recurly-2.12.1.rc1 lib/recurly/resource/errors.rb
recurly-2.12.0 lib/recurly/resource/errors.rb
recurly-2.11.3 lib/recurly/resource/errors.rb
recurly-2.9.2 lib/recurly/resource/errors.rb
recurly-2.8.2 lib/recurly/resource/errors.rb
recurly-2.7.8 lib/recurly/resource/errors.rb
recurly-2.6.3 lib/recurly/resource/errors.rb
recurly-2.5.4 lib/recurly/resource/errors.rb
recurly-2.4.11 lib/recurly/resource/errors.rb
recurly-2.3.10 lib/recurly/resource/errors.rb