entity_logger 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.rbenv-version ADDED
@@ -0,0 +1 @@
1
+ 1.9.3-p125
@@ -46,11 +46,11 @@ module EntityLogger
46
46
  attrs.map do |attr|
47
47
  case attr
48
48
  when Hash
49
- attr.values.first.call(self)
49
+ attr.values.map { |v| v.call(self) }
50
50
  else
51
51
  send(attr)
52
52
  end
53
- end
53
+ end.flatten(1)
54
54
  end
55
55
  end
56
56
  end
@@ -1,3 +1,3 @@
1
1
  module EntityLogger
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -10,8 +10,7 @@ describe EntityLogger do
10
10
  class EntityClass
11
11
  include EntityLogger::Mixin
12
12
 
13
- log Logger.new(STDOUT), 'Prefix',
14
- :attr1, :attr1, :attr3 => lambda { |e| e.attr1 + e.attr2 }
13
+ log Logger.new(STDOUT), 'Prefix', :attr1 => lambda { |e| 'T' }, :attr2 => lambda { |e| 'D' }, :attr3 => lambda { |e| e.attr1 + e.attr2 }
15
14
 
16
15
  def attr1
17
16
  'test1'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: entity_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -83,6 +83,7 @@ extensions: []
83
83
  extra_rdoc_files: []
84
84
  files:
85
85
  - .gitignore
86
+ - .rbenv-version
86
87
  - .rspec
87
88
  - Gemfile
88
89
  - LICENSE
@@ -109,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
110
  version: '0'
110
111
  segments:
111
112
  - 0
112
- hash: -983180373507418601
113
+ hash: 4593816043712734310
113
114
  required_rubygems_version: !ruby/object:Gem::Requirement
114
115
  none: false
115
116
  requirements:
@@ -118,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
119
  version: '0'
119
120
  segments:
120
121
  - 0
121
- hash: -983180373507418601
122
+ hash: 4593816043712734310
122
123
  requirements: []
123
124
  rubyforge_project:
124
125
  rubygems_version: 1.8.24