mimeo 0.0.14 → 0.0.15

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. data/lib/mimeo/version.rb +1 -1
  2. data/lib/mimeo.rb +2 -1
  3. metadata +1 -1
data/lib/mimeo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mimeo
2
- VERSION = "0.0.14"
2
+ VERSION = "0.0.15"
3
3
  end
data/lib/mimeo.rb CHANGED
@@ -7,6 +7,7 @@ module Mimeo
7
7
 
8
8
  self.ohm_model_class = model
9
9
  self.field_map = options[:field_map] if options[:field_map]
10
+ self.if_block = options[:if] if options[:if]
10
11
 
11
12
  self.set_callback :create, :after do
12
13
  self.save_to_redis
@@ -26,7 +27,7 @@ module Mimeo
26
27
  def if_block_is_truthy
27
28
  if if_block
28
29
  if if_block.is_a? String
29
- eval if_block
30
+ instance_eval if_block
30
31
  elsif if_block.is_a? Proc
31
32
  if_block.call
32
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mimeo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: