funkr 0.0.18 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,6 +34,11 @@ module Funkr
34
34
  def with(new_key_vals)
35
35
  self.class.new(@key_vals.merge(new_key_vals))
36
36
  end
37
+
38
+ def update!(new_key_vals)
39
+ @key_vals.merge!(new_key_vals)
40
+ self
41
+ end
37
42
 
38
43
  def to_hash; @key_vals; end
39
44
 
data/lib/funkr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Funkr
2
- VERSION = "0.0.18"
2
+ VERSION = "0.0.19"
3
3
  end
data/test/tests.rb CHANGED
@@ -118,6 +118,8 @@ puts format("%s is now %s and lives in %s", name, age, city)
118
118
  puts format("%s is back to %s and really lives in %s", r.name, r.age, r.city)
119
119
  r.name = "Paul R"
120
120
  puts r.to_s
121
+ r.update!(name: "Paul")
122
+ puts r.to_s
121
123
 
122
124
  class Person < SimpleRecord; fields :name, :age, :city; end
123
125
  r = Person.new(name: "Paul", age: 27, city: "Rennes")
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 18
9
- version: 0.0.18
8
+ - 19
9
+ version: 0.0.19
10
10
  platform: ruby
11
11
  authors:
12
12
  - Paul Rivier