funkr 0.0.15 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
data/lib/funkr/types.rb CHANGED
@@ -1,2 +1,3 @@
1
1
  require 'funkr/types/maybe'
2
2
  require 'funkr/types/failable'
3
+ require 'funkr/types/simple_record'
data/lib/funkr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Funkr
2
- VERSION = "0.0.15"
2
+ VERSION = "0.0.16"
3
3
  end
data/test/tests.rb CHANGED
@@ -102,3 +102,17 @@ puts(a.diff_with(b){|x,y| x[:v] == y[:v]}.inspect)
102
102
  puts "\n> make_uniq_by"
103
103
  a = [ {:v => 1}, {:v => 2}, {:v => 3}, {:v => 2}, {:v => 3}, {:v => 1} ]
104
104
  puts(a.make_uniq_by{|x,y| x[:v] == y[:v]}.inspect)
105
+
106
+
107
+ puts "\n> SimpleRecords"
108
+ r = SimpleRecord.new(name: "Paul", age: 27, city: "Rennes")
109
+ puts r.to_s
110
+ name, age, city = r
111
+ puts format("%s is %s and lives in %s", name, age, city)
112
+ name, age, city = r.with(age: 28, city: "Trouville")
113
+ puts format("%s is now %s and lives in %s", name, age, city)
114
+ puts format("%s is back to %s and really lives in %s", r.name, r.age, r.city)
115
+ r.name = "Paul R"
116
+ puts r.to_s
117
+
118
+
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 15
9
- version: 0.0.15
8
+ - 16
9
+ version: 0.0.16
10
10
  platform: ruby
11
11
  authors:
12
12
  - Paul Rivier
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-08-01 00:00:00 +02:00
17
+ date: 2011-09-26 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies: []
20
20