tidylib-validation_errors 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 722aecf2a8f94de2b3e701a673f9b09d69d6640d
4
- data.tar.gz: 7b500a83f2f98924809639ed0b38882061c8df29
3
+ metadata.gz: 96b8570aeb76db6b92077e302c62ce91ad82c3bc
4
+ data.tar.gz: cf55d2abf599c52f21ce384a8dec05f9b57101ca
5
5
  SHA512:
6
- metadata.gz: 0751776d2362138150a060c87b89ec33b433716ccf909df87ea4d57bd6c9981165300c0e6dfe1bdb8209e477ac3e7a0aee7f085f46cd0d75e620a77f8f068e98
7
- data.tar.gz: 345b20ac725b5592f113808870a4fa39614715e82a0ce649b4111e0de317c9b2f59638f9ba861ba2b220e80e9444f7862db04aa929236fbce3eddbf47d7f773c
6
+ metadata.gz: de984792c122c86d3652b84499b9c09f50481eab2f4575a03583e6cde88ad124210a6786ad0ae73122fcae515d3250005b7b11887ebad857113803d017cd3dc3
7
+ data.tar.gz: a46dd8a7f32476405d0b935db1535312b4cffa278237d7c6833f728aea2db754049231c4dd453da414d314beceb832e7dc294fdc1e34577e48d2eeabb240901a
@@ -4,7 +4,7 @@ module Tidylib
4
4
  class ValidationErrors
5
5
  include Enumerable
6
6
 
7
- VERSION = "0.1.1"
7
+ VERSION = "0.1.2"
8
8
 
9
9
  def initialize
10
10
  @errors = []
@@ -55,5 +55,10 @@ module Tidylib
55
55
  def count
56
56
  @errors.length
57
57
  end
58
+
59
+ def <<(error)
60
+ raise ArgumentError unless error.respond_to?(:topic) && error.respond_to?(:message) && error.respond_to?(:context)
61
+ @errors << error
62
+ end
58
63
  end
59
64
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tidylib-validation_errors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Suman Gurung
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-03-16 00:00:00.000000000 Z
11
+ date: 2015-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler