errorable 1.0.0

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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/errorable.rb +26 -0
  3. metadata +58 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 089002a0159204632a828572373f0ddf39a9de07
4
+ data.tar.gz: 67b15546e2bcb3a11a865ce371bf727ab145988f
5
+ SHA512:
6
+ metadata.gz: 7fa9382e857fc68d9bdb9e9259cf6abebe819794d254a78ea1b9781c77b5110da26aabf69152da9cbe28daeb468aa282ff6cdac249f595ab6946476e2656ef36
7
+ data.tar.gz: cca9146421e85c337bf13ed6bfbcc6788971c81606fea412679fa1805174539a1351f14135ebdf0f7a6696d434931c3da5b92ac4c29670b6510c57365f5c1632
data/lib/errorable.rb ADDED
@@ -0,0 +1,26 @@
1
+ module Errorable
2
+
3
+ def add_error(err)
4
+ initialize_errors
5
+ @_errors.push(err)
6
+ end
7
+
8
+ def get_errors
9
+ initialize_errors
10
+ @_errors
11
+ end
12
+
13
+ def flush_errors
14
+ initialize_errors
15
+ errors = @_errors
16
+ @_errors = []
17
+ errors
18
+ end
19
+
20
+ private
21
+
22
+ def initialize_errors
23
+ @_errors ||= []
24
+ end
25
+
26
+ end
metadata ADDED
@@ -0,0 +1,58 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: errorable
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Kevin Huynh
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2010-11-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: Adds Active Record error tracking behavior to standard ruby classes.
28
+ email: me@khuynh.info
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - lib/errorable.rb
34
+ homepage: https://github.com/heepster/errorable
35
+ licenses:
36
+ - MIT
37
+ metadata: {}
38
+ post_install_message:
39
+ rdoc_options: []
40
+ require_paths:
41
+ - lib
42
+ required_ruby_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ required_rubygems_version: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - '>='
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ requirements: []
53
+ rubyforge_project:
54
+ rubygems_version: 2.4.2
55
+ signing_key:
56
+ specification_version: 4
57
+ summary: Adds Active Record error tracking behavior to standard ruby classes.
58
+ test_files: []