packed-model 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.6
1
+ 0.1.7
@@ -127,7 +127,7 @@ module PackedModel
127
127
  when :integer, :int
128
128
  method_src << <<-METHOD
129
129
  def #{name}=(val)
130
- val = val.nil? ? nil : val.to_i
130
+ val = val.to_i
131
131
  @changed = @changed || @values[#{options[:index]}] != val
132
132
  @values[#{options[:index]}] = val
133
133
  end
@@ -136,7 +136,7 @@ module PackedModel
136
136
  if options[:filter].is_a?(Symbol) || options[:filter].is_a?(String)
137
137
  method_src << <<-METHOD
138
138
  def #{name}=(val)
139
- val = val.nil? ? nil : val.#{options[:filter]}
139
+ val = val.#{options[:filter]}
140
140
  @changed = @changed || @values[#{options[:index]}] != val
141
141
  @values[#{options[:index]}] = val
142
142
  end
@@ -144,7 +144,7 @@ module PackedModel
144
144
  elsif options[:filter] ||= block
145
145
  method_src << <<-METHOD
146
146
  def #{name}=(val)
147
- val = val.nil? ? nil : self.class.field_options(#{name.inspect})[:filter].call(val)
147
+ val = self.class.field_options(#{name.inspect})[:filter].call(val)
148
148
  @changed = @changed || @values[#{options[:index]}] != val
149
149
  @values[#{options[:index]}] = val
150
150
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "packed-model"
8
- s.version = "0.1.6"
8
+ s.version = "0.1.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Doug Youch"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: packed-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -83,7 +83,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
83
83
  version: '0'
84
84
  segments:
85
85
  - 0
86
- hash: 2188948874657673809
86
+ hash: 781577043543051578
87
87
  required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  none: false
89
89
  requirements: