ramda-ruby 0.9.0 → 0.10.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87c6a7c3172da72254170f7d90c79f3837e8a74e
4
- data.tar.gz: 0f57eed0c3497ed9da5725a72f7efa279e475473
3
+ metadata.gz: 65ad97e5bb00333847f6a7705f72b84ae81f7549
4
+ data.tar.gz: 2aab392d448af389c478cf44c1a3f5639d8948b0
5
5
  SHA512:
6
- metadata.gz: a89e53d9df3f0f65620cc5be1b85addb80b7940d2fa56b7866c5b9a3fb31125e8f928da57ea3f0a12bc46b8be55bd8fa47b5c5ec2a2030feeac904a3ed4ec1c7
7
- data.tar.gz: 7645cde2e138e671dff744fda5c108284e7d4def28de3399770faf03d1cfc3e29cd023143d5cdef1e8b52f5268c27a6d85bbb5bd6f475e8e2ca84eac2d4a44b7
6
+ metadata.gz: 5ba02e63aeb102d71134428662f1eb7574bee6f6bb57e8befa70616272fc05d7e635b4023ceae1811232069abe9b2a83e4f1afc424e8cd7c4ee277a8954651a0
7
+ data.tar.gz: e9e6e79f2b65392162157d504813a20caa3116b9096f1e2c369d709b3c4c650b9039604f5840a02c6a33edcb18ba903305b27d1d05340c3c8549093c0237c2a6
@@ -1,6 +1,23 @@
1
1
  Not Released
2
2
  ---------------
3
3
 
4
+ Release 0.10.0
5
+ ---------------
6
+
7
+ Added:
8
+
9
+ * (pending) compose_p
10
+ * (pending) pipe_p
11
+ * (pending) map_accum
12
+ * (pending) map_accum_right
13
+ * default_to
14
+ * merge_all
15
+ * partial
16
+ * partial_right
17
+ * scan
18
+ * unfold
19
+
20
+
4
21
  Release 0.9.0
5
22
  ---------------
6
23
 
data/README.md CHANGED
@@ -4,7 +4,7 @@ Ramda Ruby
4
4
  This is a ruby version of [Ramda Js](http://ramdajs.com) library.
5
5
 
6
6
  [![Gem Version](https://badge.fury.io/rb/ramda-ruby.svg)](http://badge.fury.io/rb/ramda-ruby)
7
- [![Functions](https://img.shields.io/badge/Functions-164-green.svg)](docs/FUNCTIONS.md)
7
+ [![Functions](https://img.shields.io/badge/Functions-170-green.svg)](docs/FUNCTIONS.md)
8
8
  [![Travis badge](https://travis-ci.org/lazebny/ramda-ruby.svg?branch=master)](https://travis-ci.org/lazebny/ramda-ruby)
9
9
  [![AppVeyor status](https://ci.appveyor.com/api/projects/status/ponccdax7aj4ufw2?svg=true)](https://ci.appveyor.com/project/lazebny/ramda-ruby)
10
10
  [![Coverage Status](https://coveralls.io/repos/lazebny/ramda-ruby/badge.png)](https://coveralls.io/r/lazebny/ramda-ruby)
@@ -168,15 +168,40 @@ bundle exec rake ramda:run_benchmark_to_file[bench/list/*]
168
168
  Development
169
169
  --------------
170
170
 
171
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
171
+ You can use either regular approach with installing gems on local machine
172
+ or with docker-compose which is handy when you are playing with ruby versions.
172
173
 
173
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
174
+ With docker-compose:
175
+
176
+ 1. Install [Docker](https://docs.docker.com/engine/installation/)
177
+ 2. Install [Docker Compose](https://docs.docker.com/compose/install/)
178
+ 3. Run tests
179
+
180
+ ```sh
181
+
182
+ touch .bashrc.docker .pry_history.docker
183
+ docker-compose run --rm app bash
184
+ bundle
185
+ rspec
186
+
187
+ ```
188
+
189
+ To release a new version, update the version number in `version.rb`,
190
+ and then run `bundle exec rake release`, which will create a git tag
191
+ for the version, push git commits and tags, and push the `.gem` file
192
+ to [rubygems.org](https://rubygems.org).
174
193
 
175
194
 
176
195
  Contributing
177
196
  --------------
178
197
 
179
- Bug reports and pull requests are welcome on GitHub at https://github.com/lazebny/ramda-ruby.
198
+ 1. Fork it
199
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
200
+ 3. Make changes
201
+ 4. Check with Rubocop and resolve all issues(`rubocop -aD`)
202
+ 5. Commit your changes (`git commit -am 'Add some feature'`)
203
+ 6. Push to the branch (`git push origin my-new-feature`)
204
+ 7. Create new Pull Request
180
205
 
181
206
 
182
207
  License
data/ROADMAP.md CHANGED
@@ -1,16 +1,3 @@
1
- Release 0.10.0
2
- ---------------
3
- * compose_p
4
- * default_to
5
- * map_accum
6
- * map_accum_right
7
- * merge_all
8
- * partial
9
- * partial_right
10
- * pipe_p
11
- * scan
12
- * unfold
13
-
14
1
  Release 0.11.0
15
2
  ---------------
16
3
  * dissoc_path
@@ -1,168 +1,212 @@
1
+ * (pending) compose_p
1
2
  * (pending) keys_in
3
+ * (pending) map_accum
4
+ * (pending) map_accum_right
2
5
  * (pending) math_mod
6
+ * (pending) pipe_p
3
7
  * (pending) to_pairs_in
4
8
  * (pending) values_in
5
- * F
6
- * T
7
- * `__` - first function call should have all arguments `g(__2, __)(1, 3)`, this means that it doesn't support `g(__, 2)(1)(3)`, `g(__, 2)(1, 3)` and `g(__, 2)(__, 3)(1)`
8
- * add
9
- * all
10
- * all_pass
11
- * always
12
- * and
13
- * any
14
- * any_pass
15
- * ap
16
- * append
17
- * apply
18
- * assoc
19
- * assoc_path
20
- * binary
21
- * bind
22
- * call
23
- * chain
24
- * clone
25
- * comparator
26
- * complement
27
- * compose
28
- * concat
29
- * cond
30
- * construct
31
- * construct_n
32
- * contains
33
- * converge
34
- * count_by
35
- * curry
36
- * curry_n
37
- * dec
38
- * difference
39
- * difference_with
40
- * dissoc
41
- * divide
42
- * drop
43
- * drop_while
44
- * empty - uses x.class.new for defining new empty object if empty method does not exist
45
- * eq_by
46
- * eq_props
47
- * equals
48
- * evolve
49
- * filter
50
- * find
51
- * find_index - returns nil if index doesn't exist
52
- * find_last
53
- * find_last_index - returns nil if index doesn't exist
54
- * flatten
55
- * flip
56
- * for_each
57
- * from_pairs
58
- * group_by
59
- * gt
60
- * gte
61
- * has
62
- * has_in
63
- * head
64
- * identity
65
- * if_else
66
- * inc
67
- * index_of - returns nil if index doesn't exist
68
- * init
69
- * insert
70
- * insert_all
71
- * intersection
72
- * invert
73
- * invert_obj
74
- * invoker
75
- * is
76
- * is_empty
77
- * is_nil
78
- * join
79
- * juxt
80
- * keys
81
- * last
82
- * last_index_of - returns nil if index doesn't exist
83
- * length
84
- * lens - composition does not work compose(lens1, lensb)
85
- * lens_index
86
- * lens_path
87
- * lens_prop
88
- * lift
89
- * lift_n
90
- * lt
91
- * lte
92
- * map
93
- * map_obj_indexed
94
- * match
95
- * max
96
- * max_by
97
- * memoize
98
- * merge
99
- * min
100
- * min_by
101
- * modulo
102
- * multiply
103
- * n_ary
104
- * negate
105
- * not
106
- * nth
107
- * nth_arg
108
- * of
109
- * omit
110
- * once
111
- * or
112
- * over
113
- * partition
114
- * path
115
- * path_eq
116
- * pick
117
- * pick_all
118
- * pick_by
119
- * pipe
120
- * pluck
121
- * prepend
122
- * product
123
- * project
124
- * prop
125
- * prop_eq
126
- * prop_or
127
- * props
128
- * range
129
- * reduce
130
- * reduce_right
131
- * reject
132
- * remove
133
- * repeat
134
- * replace - it uses a gsub method and global replacement
135
- * reverse
136
- * set
137
- * slice
138
- * sort
139
- * sort_by
140
- * split
141
- * subtract
142
- * sum
143
- * tail
144
- * take
145
- * take_while
146
- * tap
147
- * times
148
- * to_lower
149
- * to_pairs
150
- * to_upper
151
- * trim
152
- * type
153
- * unapply
154
- * unary
155
- * union
156
- * union_with
157
- * uniq
158
- * uniq_with - first argument is a function with 1 arity which transforms each list element and applies uniq function to results
159
- * unnest
160
- * update
161
- * use_with
162
- * values
163
- * view
164
- * where
165
- * xprod
166
- * zip
167
- * zip_obj
168
- * zip_with
9
+
10
+ Function
11
+ ------------
12
+
13
+ * [F](http://ramdajs.com/docs/#F)
14
+ * [T](http://ramdajs.com/docs/#T)
15
+ * [`__`](http://ramdajs.com/docs/) - first function call should have all arguments `g(__2, __)(1, 3)`, this means that it doesn't support `g(__, 2)(1)(3)`, `g(__, 2)(1, 3)` and `g(__, 2)(__, 3)(1)`
16
+ * [always](http://ramdajs.com/docs/#always)
17
+ * [ap](http://ramdajs.com/docs/#ap)
18
+ * [apply](http://ramdajs.com/docs/#apply)
19
+ * [binary](http://ramdajs.com/docs/#binary)
20
+ * [bind](http://ramdajs.com/docs/#bind)
21
+ * [call](http://ramdajs.com/docs/#call)
22
+ * [comparator](http://ramdajs.com/docs/#comparator)
23
+ * [compose](http://ramdajs.com/docs/#compose)
24
+ * [construct](http://ramdajs.com/docs/#construct)
25
+ * [construct_n](http://ramdajs.com/docs/#constructN)
26
+ * [converge](http://ramdajs.com/docs/#converge)
27
+ * [curry](http://ramdajs.com/docs/#curry)
28
+ * [curry_n](http://ramdajs.com/docs/#curryN)
29
+ * [empty](http://ramdajs.com/docs/#empty) - uses x.class.new for defining new empty object if empty method does not exist
30
+ * [flip](http://ramdajs.com/docs/#flip)
31
+ * [identity](http://ramdajs.com/docs/#identity)
32
+ * [invoker](http://ramdajs.com/docs/#invoker)
33
+ * [juxt](http://ramdajs.com/docs/#juxt)
34
+ * [lift](http://ramdajs.com/docs/#lift)
35
+ * [lift_n](http://ramdajs.com/docs/#liftN)
36
+ * [memoize](http://ramdajs.com/docs/#memoize)
37
+ * [n_ary](http://ramdajs.com/docs/#nAry)
38
+ * [nth_arg](http://ramdajs.com/docs/#nthArg)
39
+ * [of](http://ramdajs.com/docs/#cond)
40
+ * [once](http://ramdajs.com/docs/#once)
41
+ * [partial](http://ramdajs.com/docs/#partial)
42
+ * [partial_right](http://ramdajs.com/docs/#partialRight)
43
+ * [pipe](http://ramdajs.com/docs/#pipe)
44
+ * [tap](http://ramdajs.com/docs/#tap)
45
+ * [unapply](http://ramdajs.com/docs/#unapply)
46
+ * [unary](http://ramdajs.com/docs/#unary)
47
+ * [use_with](http://ramdajs.com/docs/#useWith)
48
+
49
+ List
50
+ ------------
51
+
52
+ * [all](http://ramdajs.com/docs/#all)
53
+ * [any](http://ramdajs.com/docs/#any)
54
+ * [append](http://ramdajs.com/docs/#append)
55
+ * [chain](http://ramdajs.com/docs/#chain)
56
+ * [concat](http://ramdajs.com/docs/#concat)
57
+ * [contains](http://ramdajs.com/docs/#contains)
58
+ * [drop](http://ramdajs.com/docs/#drop)
59
+ * [drop_while](http://ramdajs.com/docs/#dropWhile)
60
+ * [filter](http://ramdajs.com/docs/#filter)
61
+ * [find](http://ramdajs.com/docs/#find)
62
+ * [find_index](http://ramdajs.com/docs/#findIndex) - returns nil if index doesn't exist
63
+ * [find_last](http://ramdajs.com/docs/#findLast)
64
+ * [find_last_index](http://ramdajs.com/docs/#findLastIndex) - returns nil if index doesn't exist
65
+ * [flatten](http://ramdajs.com/docs/#flatten)
66
+ * [for_each](http://ramdajs.com/docs/#forEach)
67
+ * [from_pairs](http://ramdajs.com/docs/#fromPairs)
68
+ * [group_by](http://ramdajs.com/docs/#groupBy)
69
+ * [head](http://ramdajs.com/docs/#head)
70
+ * [index_of](http://ramdajs.com/docs/#indexOf) - returns nil if index doesn't exist
71
+ * [init](http://ramdajs.com/docs/#init)
72
+ * [insert](http://ramdajs.com/docs/#insert)
73
+ * [insert_all](http://ramdajs.com/docs/#insertAll)
74
+ * [join](http://ramdajs.com/docs/#join)
75
+ * [last](http://ramdajs.com/docs/#last)
76
+ * [last_index_of](http://ramdajs.com/docs/#lastIndexOf) - returns nil if index doesn't exist
77
+ * [length](http://ramdajs.com/docs/#length)
78
+ * [map](http://ramdajs.com/docs/#map)
79
+ * [map_obj_indexed](http://ramdajs.com/docs/#mapObjIndexed)
80
+ * [merge_all](http://ramdajs.com/docs/#mergeAll)
81
+ * [nth](http://ramdajs.com/docs/#nth)
82
+ * [partition](http://ramdajs.com/docs/#partition)
83
+ * [pluck](http://ramdajs.com/docs/#pluck)
84
+ * [prepend](http://ramdajs.com/docs/#prepend)
85
+ * [range](http://ramdajs.com/docs/#range)
86
+ * [reduce](http://ramdajs.com/docs/#reduce)
87
+ * [reduce_right](http://ramdajs.com/docs/#reduceRight)
88
+ * [reject](http://ramdajs.com/docs/#reject)
89
+ * [remove](http://ramdajs.com/docs/#remove)
90
+ * [repeat](http://ramdajs.com/docs/#repeat)
91
+ * [reverse](http://ramdajs.com/docs/#reverse)
92
+ * [scan](http://ramdajs.com/docs/#scan)
93
+ * [slice](http://ramdajs.com/docs/#slice)
94
+ * [sort](http://ramdajs.com/docs/#sort)
95
+ * [sort_by](http://ramdajs.com/docs/#sortBy)
96
+ * [tail](http://ramdajs.com/docs/#tail)
97
+ * [take](http://ramdajs.com/docs/#take)
98
+ * [take_while](http://ramdajs.com/docs/#takeWhile)
99
+ * [times](http://ramdajs.com/docs/#times)
100
+ * [unfold](http://ramdajs.com/docs/#unfold)
101
+ * [uniq](http://ramdajs.com/docs/#uniq)
102
+ * [uniq_with](http://ramdajs.com/docs/#uniqWith) - first argument is a function with 1 arity which transforms each list element and applies uniq function to results
103
+ * [unnest](http://ramdajs.com/docs/#unnest)
104
+ * [update](http://ramdajs.com/docs/#update)
105
+ * [xprod](http://ramdajs.com/docs/#xprod)
106
+ * [zip](http://ramdajs.com/docs/#zip)
107
+ * [zip_obj](http://ramdajs.com/docs/#zipObj)
108
+ * [zip_with](http://ramdajs.com/docs/#zipWith)
109
+
110
+ Logic
111
+ ------------
112
+
113
+ * [all_pass](http://ramdajs.com/docs/#allPass)
114
+ * [and](http://ramdajs.com/docs/#and)
115
+ * [any_pass](http://ramdajs.com/docs/#anyPass)
116
+ * [complement](http://ramdajs.com/docs/#complement)
117
+ * [cond](http://ramdajs.com/docs/#cond)
118
+ * [default_to](http://ramdajs.com/docs/#defaultTo)
119
+ * [if_else](http://ramdajs.com/docs/#ifElse)
120
+ * [is_empty](http://ramdajs.com/docs/#isEmpty)
121
+ * [not](http://ramdajs.com/docs/#not)
122
+ * [or](http://ramdajs.com/docs/#or)
123
+
124
+ Math
125
+ ------------
126
+
127
+ * [add](http://ramdajs.com/docs/#add)
128
+ * [dec](http://ramdajs.com/docs/#dec)
129
+ * [divide](http://ramdajs.com/docs/#divide)
130
+ * [inc](http://ramdajs.com/docs/#inc)
131
+ * [modulo](http://ramdajs.com/docs/#modulo)
132
+ * [multiply](http://ramdajs.com/docs/#multiply)
133
+ * [negate](http://ramdajs.com/docs/#negate)
134
+ * [product](http://ramdajs.com/docs/#product)
135
+ * [subtract](http://ramdajs.com/docs/#substract)
136
+ * [sum](http://ramdajs.com/docs/#sum)
137
+
138
+ Object
139
+ ------------
140
+
141
+ * [assoc](http://ramdajs.com/docs/#assoc)
142
+ * [assoc_path](http://ramdajs.com/docs/#assocPath)
143
+ * [clone](http://ramdajs.com/docs/#clone)
144
+ * [dissoc](http://ramdajs.com/docs/#dissoc)
145
+ * [eq_props](http://ramdajs.com/docs/#eqProps)
146
+ * [evolve](http://ramdajs.com/docs/#evolve)
147
+ * [has](http://ramdajs.com/docs/#has)
148
+ * [has_in](http://ramdajs.com/docs/#hasIn)
149
+ * [invert](http://ramdajs.com/docs/#invert)
150
+ * [invert_obj](http://ramdajs.com/docs/#invertObj)
151
+ * [keys](http://ramdajs.com/docs/#keys)
152
+ * [lens](http://ramdajs.com/docs/#lens) - composition does not work compose(lens1, lensb)
153
+ * [lens_index](http://ramdajs.com/docs/#lensIndex)
154
+ * [lens_path](http://ramdajs.com/docs/#lensPath)
155
+ * [lens_prop](http://ramdajs.com/docs/#lensProp)
156
+ * [merge](http://ramdajs.com/docs/#merge)
157
+ * [omit](http://ramdajs.com/docs/#omit)
158
+ * [over](http://ramdajs.com/docs/#over)
159
+ * [path](http://ramdajs.com/docs/#path)
160
+ * [pick](http://ramdajs.com/docs/#pick)
161
+ * [pick_all](http://ramdajs.com/docs/#pickAll)
162
+ * [pick_by](http://ramdajs.com/docs/#pickBy)
163
+ * [project](http://ramdajs.com/docs/#project)
164
+ * [prop](http://ramdajs.com/docs/#prop)
165
+ * [prop_or](http://ramdajs.com/docs/#propOr)
166
+ * [props](http://ramdajs.com/docs/#props)
167
+ * [set](http://ramdajs.com/docs/#set)
168
+ * [to_pairs](http://ramdajs.com/docs/#toPairs)
169
+ * [values](http://ramdajs.com/docs/#values)
170
+ * [view](http://ramdajs.com/docs/#view)
171
+ * [where](http://ramdajs.com/docs/#where)
172
+
173
+
174
+ Relation
175
+ ------------
176
+
177
+ * [count_by](http://ramdajs.com/docs/#countBy)
178
+ * [difference](http://ramdajs.com/docs/#difference)
179
+ * [difference_with](http://ramdajs.com/docs/#differenceWith)
180
+ * [eq_by](http://ramdajs.com/docs/#eqBy)
181
+ * [equals](http://ramdajs.com/docs/#equals)
182
+ * [gt](http://ramdajs.com/docs/#gt)
183
+ * [gte](http://ramdajs.com/docs/#gte)
184
+ * [intersection](http://ramdajs.com/docs/#intersection)
185
+ * [lt](http://ramdajs.com/docs/#lt)
186
+ * [lte](http://ramdajs.com/docs/#lte)
187
+ * [max](http://ramdajs.com/docs/#max)
188
+ * [max_by](http://ramdajs.com/docs/#maxBy)
189
+ * [min](http://ramdajs.com/docs/#min)
190
+ * [min_by](http://ramdajs.com/docs/#minBy)
191
+ * [path_eq](http://ramdajs.com/docs/#pathEq)
192
+ * [prop_eq](http://ramdajs.com/docs/#propEq)
193
+ * [sort_by](http://ramdajs.com/docs/#sortBy)
194
+ * [union](http://ramdajs.com/docs/#union)
195
+ * [union_with](http://ramdajs.com/docs/#unionWith)
196
+
197
+ String
198
+ ------------
199
+
200
+ * [match](http://ramdajs.com/docs/#math)
201
+ * [replace](http://ramdajs.com/docs/#replace) - it uses a gsub method and global replacement
202
+ * [split](http://ramdajs.com/docs/#split)
203
+ * [to_lower](http://ramdajs.com/docs/#toLower)
204
+ * [to_upper](http://ramdajs.com/docs/#toUpper)
205
+ * [trim](http://ramdajs.com/docs/#trim)
206
+
207
+ Type
208
+ ------------
209
+
210
+ * [is](http://ramdajs.com/docs/#is)
211
+ * [is_nil](http://ramdajs.com/docs/#isNil)
212
+ * [type](http://ramdajs.com/docs/#type)
@@ -27,10 +27,10 @@ module Ramda
27
27
  # Apply f => f (a -> b) -> f a -> f b
28
28
  #
29
29
  curried_method(:ap) do |apply_f, apply_x|
30
- if apply_x.respond_to?(:ap)
31
- apply_x.ap(apply_f)
32
- else
30
+ if apply_x.is_a?(Array)
33
31
  apply_f.flat_map { |fn| apply_x.map(&fn) }
32
+ else
33
+ Internal::Dispatchable.call([:ap], nil, apply_f, apply_x)
34
34
  end
35
35
  end
36
36
 
@@ -308,6 +308,26 @@ module Ramda
308
308
  end.curry
309
309
  end
310
310
 
311
+ # Takes a function f and a list of arguments, and returns a function g.
312
+ # When applied, g returns the result of applying f to the arguments
313
+ # provided initially followed by the arguments provided to g.
314
+ #
315
+ # ((a, b, c, ..., n) -> x) -> [a, b, c, ...] -> ((d, e, f, ..., n) -> x)
316
+ #
317
+ curried_method(:partial) do |fn, args|
318
+ Ramda.curry(fn).call(*args)
319
+ end
320
+
321
+ # Takes a function f and a list of arguments, and returns a function g.
322
+ # When applied, g returns the result of applying f to the arguments
323
+ # provided to g followed by the arguments provided initially.
324
+ #
325
+ # ((a, b, c, ..., n) -> x) -> [d, e, f, ..., n] -> ((a, b, c, ...) -> x)
326
+ #
327
+ curried_method(:partial_right) do |fn, args|
328
+ Ramda.curry(fn).call(*Array.new(fn.arity - args.size, Ramda.__) + args)
329
+ end
330
+
311
331
  # Performs left-to-right function composition. The leftmost function may
312
332
  # have any arity; the remaining functions must be unary.
313
333
  # In some libraries this function is named sequence.
@@ -0,0 +1,28 @@
1
+ module Ramda
2
+ module Internal
3
+ # Dispatchable
4
+ module Dispatchable
5
+ #
6
+ # Returns a function that dispatches with different strategies based on the
7
+ # object in list position (last argument). If it is an array, executes [fn].
8
+ # Otherwise, if it has a function with [methodname], it will execute that
9
+ # function (functor case). Otherwise, if it is a transformer, uses transducer
10
+ # [xf] to return a new transformer (transducer case). Otherwise, it will
11
+ # default to executing [fn].
12
+ #
13
+ # @private
14
+ # - @param {String} methodname property to check for a custom implementation
15
+ # - @param {Function} xf transducer to initialize if object is transformer
16
+ # - @param {Function} fn default ramda implementation
17
+ # - @return {Function} A function that dispatches on object in list position
18
+ #
19
+ def self.call(method_names, _xf, *args, xs)
20
+ method_name = method_names.find { |name| xs.respond_to?(name) }
21
+
22
+ return xs.public_send(method_name, *args) if method_name
23
+
24
+ raise ArgumentError, "Unexpected type #{xs.class} in method: #{method_name}"
25
+ end
26
+ end
27
+ end
28
+ end
@@ -1,4 +1,5 @@
1
1
  require_relative 'internal/curried_method'
2
+ require_relative 'internal/dispatchable'
2
3
 
3
4
  module Ramda
4
5
  # List functions
@@ -8,24 +9,36 @@ module Ramda
8
9
 
9
10
  # Returns true if all elements of the list match the predicate,
10
11
  # false if there are any that don't.
12
+ #
11
13
  # Dispatches to the all method of the second argument, if present.
14
+ #
12
15
  # Acts as a transducer if a transformer is given in list position.
13
16
  #
14
17
  # (a -> Boolean) -> [a] -> Boolean
15
18
  #
16
19
  curried_method(:all) do |f, xs|
17
- xs.all?(&f)
20
+ if xs.is_a?(::Array)
21
+ xs.all?(&f)
22
+ else
23
+ Internal::Dispatchable.call([:any], nil, f, xs)
24
+ end
18
25
  end
19
26
 
20
27
  # Returns true if at least one of elements of the list match the predicate,
21
28
  # false otherwise.
29
+ #
22
30
  # Dispatches to the any method of the second argument, if present.
31
+ #
23
32
  # Acts as a transducer if a transformer is given in list position.
24
33
  #
25
34
  # (a -> Boolean) -> [a] -> Boolean
26
35
  #
27
36
  curried_method(:any) do |f, xs|
28
- xs.any?(&f)
37
+ if xs.is_a?(::Array)
38
+ xs.any?(&f)
39
+ else
40
+ Internal::Dispatchable.call([:any], nil, f, xs)
41
+ end
29
42
  end
30
43
 
31
44
  # Returns a new list containing the contents of the given list,
@@ -45,13 +58,11 @@ module Ramda
45
58
  #
46
59
  # Chain m => (a -> m b) -> m a -> m b
47
60
  #
48
- curried_method(:chain) do |fn, xs|
49
- if xs.respond_to?(:chain)
50
- xs.chain(fn)
51
- elsif xs.respond_to?(:bind)
52
- xs.bind(fn)
61
+ curried_method(:chain) do |f, xs|
62
+ if xs.is_a?(::Array)
63
+ xs.flat_map(&f)
53
64
  else
54
- xs.flat_map(&fn)
65
+ Internal::Dispatchable.call([:chain, :bind], nil, f, xs)
55
66
  end
56
67
  end
57
68
 
@@ -61,19 +72,21 @@ module Ramda
61
72
  # List -> List -> List
62
73
  #
63
74
  curried_method(:concat) do |list_a, list_b|
64
- case list_a
75
+ case list_b
65
76
  when ::String, ::Symbol
66
77
  [list_a, list_b].join('')
67
78
  when ::Array
68
79
  list_a.dup + list_b
69
80
  else
70
- type_error(list_a, :concat)
81
+ Internal::Dispatchable.call([:concat], nil, list_a, list_b)
71
82
  end
72
83
  end
73
84
 
74
85
  # Returns true if the specified value is equal, in R.equals terms,
75
86
  # to at least one element of the given list; false otherwise.
76
87
  #
88
+ # Dispatches to the concat method of the first argument, if present.
89
+ #
77
90
  # a -> [a] -> Boolean
78
91
  #
79
92
  curried_method(:contains) do |x, xs|
@@ -83,6 +96,8 @@ module Ramda
83
96
  # Returns all but the first n elements of the given list, string,
84
97
  # or transducer/transformer (or object with a drop method).
85
98
  #
99
+ # Dispatches to the drop method of the second argument, if present.
100
+ #
86
101
  # Number -> [a] -> [a]
87
102
  # Number -> String -> String
88
103
  #
@@ -93,7 +108,7 @@ module Ramda
93
108
  when ::Array
94
109
  xs[num..-1] || []
95
110
  else
96
- type_error(xs, :drop)
111
+ Internal::Dispatchable.call([:drop], nil, num, xs)
97
112
  end
98
113
  end
99
114
 
@@ -109,14 +124,19 @@ module Ramda
109
124
  #
110
125
  # (a -> Boolean) -> [a] -> [a]
111
126
  #
112
- curried_method(:drop_while) do |fn, xs|
113
- xs.drop_while(&fn)
127
+ curried_method(:drop_while) do |f, xs|
128
+ if xs.is_a?(::Array)
129
+ xs.drop_while(&f)
130
+ else
131
+ Internal::Dispatchable.call([:drop_while], nil, f, xs)
132
+ end
114
133
  end
115
134
 
116
135
  # Takes a predicate and a Filterable, and returns a new filterable of the same
117
136
  # type containing the members of the given filterable which satisfy the given
118
137
  # predicate. Filterable objects include plain objects or any object that
119
138
  # has a filter method such as Array.
139
+ #
120
140
  # Dispatches to the filter method of the second argument, if present.
121
141
  #
122
142
  # Filterable f => (a -> Boolean) -> f a -> f a
@@ -125,8 +145,10 @@ module Ramda
125
145
  case xs
126
146
  when ::Hash
127
147
  xs.select { |_, value| f.call(value) }
128
- else
148
+ when ::Array
129
149
  xs.select(&f)
150
+ else
151
+ Internal::Dispatchable.call([:filter], nil, f, xs)
130
152
  end
131
153
  end
132
154
 
@@ -142,10 +164,16 @@ module Ramda
142
164
  # Returns the first element of the list which matches the predicate,
143
165
  # or undefined if no element matches.
144
166
  #
167
+ # Dispatches to the find method of the second argument, if present.
168
+ #
145
169
  # (a -> Boolean) -> [a] -> a | NilClass
146
170
  #
147
171
  curried_method(:find) do |f, xs|
148
- xs.find(&f)
172
+ if xs.is_a?(::Array)
173
+ xs.find(&f)
174
+ else
175
+ Internal::Dispatchable.call([:find], nil, f, xs)
176
+ end
149
177
  end
150
178
 
151
179
  # Returns the index of the first element of the list which matches the predicate,
@@ -153,8 +181,8 @@ module Ramda
153
181
  #
154
182
  # (a -> Boolean) -> [a] -> Number | NilClass
155
183
  #
156
- curried_method(:find_index) do |fn, xs|
157
- xs.index(&fn)
184
+ curried_method(:find_index) do |f, xs|
185
+ xs.index(&f)
158
186
  end
159
187
 
160
188
  # Returns the last element of the list which matches the predicate,
@@ -162,8 +190,8 @@ module Ramda
162
190
  #
163
191
  # (a -> Boolean) -> [a] -> a | NilClass
164
192
  #
165
- curried_method(:find_last) do |fn, xs|
166
- index = xs.rindex(&fn)
193
+ curried_method(:find_last) do |f, xs|
194
+ index = xs.rindex(&f)
167
195
  xs[index] unless index.nil?
168
196
  end
169
197
 
@@ -172,8 +200,8 @@ module Ramda
172
200
  #
173
201
  # (a -> Boolean) -> [a] -> Number | NilClass
174
202
  #
175
- curried_method(:find_last_index) do |fn, xs|
176
- xs.rindex(&fn)
203
+ curried_method(:find_last_index) do |f, xs|
204
+ xs.rindex(&f)
177
205
  end
178
206
 
179
207
  # Returns a new list by pulling every item out of it (and all its sub-arrays)
@@ -186,20 +214,33 @@ module Ramda
186
214
  # Iterate over an input list, calling a provided function fn for each element
187
215
  # in the list.
188
216
  #
217
+ # Dispatches to the forEach method of the second argument, if present.
218
+ #
189
219
  # (a -> *) -> [a] -> [a]
190
220
  #
191
- curried_method(:for_each) do |fn, xs|
192
- xs.each(&fn)
221
+ curried_method(:for_each) do |f, xs|
222
+ if xs.is_a?(::Array)
223
+ xs.each(&f)
224
+ else
225
+ Internal::Dispatchable.call([:for_each], nil, f, xs)
226
+ end
193
227
  end
194
228
 
195
229
  # Splits a list into sub-lists stored in an object, based on the result of
196
230
  # calling a String-returning function on each element, and grouping the
197
231
  # results according to values returned.
198
232
  #
233
+ # Dispatches to the groupBy method of the second argument, if present.
234
+ #
235
+ #
199
236
  # (a -> String) -> [a] -> {String: [a]}
200
237
  #
201
238
  curried_method(:group_by) do |f, xs|
202
- xs.group_by(&f)
239
+ if xs.is_a?(::Array)
240
+ xs.group_by(&f)
241
+ else
242
+ Internal::Dispatchable.call([:group_by], nil, f, xs)
243
+ end
203
244
  end
204
245
 
205
246
  # Returns the first element of the given list or string. In some libraries
@@ -297,21 +338,39 @@ module Ramda
297
338
  #
298
339
  # Functor f => (a -> b) -> f a -> f b
299
340
  #
300
- curried_method(:map) do |f, functor|
301
- case functor
341
+ curried_method(:map) do |f, xs|
342
+ case xs
302
343
  when ::Hash
303
- Hash[functor.map { |k, v| [k, f.call(v)] }]
344
+ Hash[xs.map { |k, v| [k, f.call(v)] }]
304
345
  when ::Array
305
- functor.map(&f)
346
+ xs.map(&f)
306
347
  else
307
- if functor.respond_to?(:map)
308
- functor.map(f)
309
- else
310
- type_error(functor, :map)
311
- end
348
+ Internal::Dispatchable.call([:map], nil, f, xs)
312
349
  end
313
350
  end
314
351
 
352
+ # The mapAccum function behaves like a combination of map and reduce;
353
+ # it applies a function to each element of a list, passing
354
+ # an accumulating parameter from left to right, and returning
355
+ # a final value of this accumulator together with the new list.
356
+ #
357
+ # The iterator function receives two arguments, acc and value,
358
+ # and should return a tuple [acc, value].
359
+ #
360
+ # (acc -> x -> (acc, y)) -> acc -> [x] -> (acc, [y])
361
+ #
362
+ # curried_method(:map_accum) do |fn, acc, xs|
363
+ #
364
+ # end
365
+
366
+ # Merges a list of objects together into one object.
367
+ #
368
+ # [{k: v}] -> {k: v}
369
+ #
370
+ curried_method(:merge_all) do |xs|
371
+ xs.reduce(&:merge)
372
+ end
373
+
315
374
  # Returns the nth element of the given list or string. If n is negative
316
375
  # the element at index length + n is returned.
317
376
  #
@@ -335,8 +394,8 @@ module Ramda
335
394
  #
336
395
  # Filterable f => (a -> Boolean) -> f a -> [f a, f a]
337
396
  #
338
- curried_method(:partition) do |fn, xs|
339
- ::Ramda.juxt([::Ramda.filter, ::Ramda.reject]).call(fn, xs)
397
+ curried_method(:partition) do |f, xs|
398
+ ::Ramda.juxt([::Ramda.filter, ::Ramda.reject]).call(f, xs)
340
399
  end
341
400
 
342
401
  # Returns a new list by plucking the same named property off all objects
@@ -378,8 +437,8 @@ module Ramda
378
437
  #
379
438
  # ((a, b) -> a) -> a -> [b] -> a
380
439
  #
381
- curried_method(:reduce) do |fn, acc, xs|
382
- xs.reduce(acc, &fn)
440
+ curried_method(:reduce) do |f, acc, xs|
441
+ xs.reduce(acc, &f)
383
442
  end
384
443
 
385
444
  # Returns a single item by iterating through the list, successively
@@ -394,8 +453,8 @@ module Ramda
394
453
  #
395
454
  # ((a, b) -> a) -> a -> [b] -> a
396
455
  #
397
- curried_method(:reduce_right) do |fn, acc_arg, xs|
398
- xs.reverse.reduce(acc_arg) { |acc, x| fn.call(x, acc) }
456
+ curried_method(:reduce_right) do |f, acc_arg, xs|
457
+ xs.reverse.reduce(acc_arg) { |acc, x| f.call(x, acc) }
399
458
  end
400
459
 
401
460
  # Returns a new list or string with the elements or characters in reverse order.
@@ -430,7 +489,16 @@ module Ramda
430
489
  # a -> n -> [a]
431
490
  #
432
491
  curried_method(:repeat) do |a, n|
433
- Array.new(n, a)
492
+ ::Array.new(n, a)
493
+ end
494
+
495
+ # Scan is similar to reduce, but returns a list of successively
496
+ # reduced values from the left
497
+ #
498
+ # (a,b -> a) -> a -> [b] -> [a]
499
+ #
500
+ curried_method(:scan) do |f, acc0, xs|
501
+ xs.reduce([acc0]) { |acc, x| acc << f.call(acc[-1], x) }
434
502
  end
435
503
 
436
504
  # Returns the elements of the given list or string
@@ -440,7 +508,12 @@ module Ramda
440
508
  # Number -> Number -> String -> String
441
509
  #
442
510
  curried_method(:slice) do |from, to, xs|
443
- xs[from...to]
511
+ case xs
512
+ when ::Array, ::String
513
+ xs[from...to]
514
+ else
515
+ Internal::Dispatchable.call([:slice], nil, from, to, xs)
516
+ end
444
517
  end
445
518
 
446
519
  # Returns a copy of the list, sorted according to the comparator function,
@@ -465,11 +538,18 @@ module Ramda
465
538
 
466
539
  # Returns the first n elements of the given list, string.
467
540
  #
541
+ # Dispatches to the take method of the second argument, if present.
542
+ #
468
543
  # Number -> [a] -> [a]
469
544
  # Number -> String -> String
470
545
  #
471
546
  curried_method(:take) do |num, xs|
472
- xs[0, num]
547
+ case xs
548
+ when ::Array, ::String
549
+ xs[0, num]
550
+ else
551
+ Internal::Dispatchable.call([:take], nil, num, xs)
552
+ end
473
553
  end
474
554
 
475
555
  # Returns a new list containing the first n elements of a given list,
@@ -480,8 +560,12 @@ module Ramda
480
560
  #
481
561
  # (a -> Boolean) -> [a] -> [a]
482
562
  #
483
- curried_method(:take_while) do |fn, xs|
484
- xs[0, xs.index { |x| !fn.call(x) } || xs.size]
563
+ curried_method(:take_while) do |f, xs|
564
+ if xs.is_a?(::Array)
565
+ xs[0, xs.index { |x| !f.call(x) } || xs.size]
566
+ else
567
+ Internal::Dispatchable.call([:take_while], nil, f, xs)
568
+ end
485
569
  end
486
570
 
487
571
  # Calls an input function n times, returning an array containing the results
@@ -491,8 +575,30 @@ module Ramda
491
575
  #
492
576
  # (Number -> a) -> Number -> [a]
493
577
  #
494
- curried_method(:times) do |fn, n|
495
- n.times.to_a.map(&fn)
578
+ curried_method(:times) do |f, n|
579
+ n.times.to_a.map(&f)
580
+ end
581
+
582
+ # Builds a list from a seed value. Accepts an iterator function, which
583
+ # returns either false to stop iteration or an array of length 2
584
+ # containing the value to add to the resulting list and the seed
585
+ # to be used in the next call to the iterator function.
586
+ #
587
+ # The iterator function receives one argument: (seed).
588
+ #
589
+ # (a -> [b]) -> * -> [b]
590
+ #
591
+ curried_method(:unfold) do |f, n|
592
+ xs = []
593
+ loop do
594
+ res = f.call(n)
595
+
596
+ break if res.is_a?(FalseClass)
597
+
598
+ xs << res[0]
599
+ n = res[1]
600
+ end
601
+ xs
496
602
  end
497
603
 
498
604
  # Returns a new list containing only one copy of each element in the original list.
@@ -504,8 +610,8 @@ module Ramda
504
610
  # Returns a new list containing only one copy of each element in the original list,
505
611
  # based upon the value returned by applying the supplied predicate to each list
506
612
  # element.
507
- curried_method(:uniq_with) do |fn, xs|
508
- xs.uniq(&fn)
613
+ curried_method(:uniq_with) do |f, xs|
614
+ xs.uniq(&f)
509
615
  end
510
616
 
511
617
  # Shorthand for R.chain(R.identity), which removes one level of nesting from any Chain.
@@ -561,8 +667,8 @@ module Ramda
561
667
  #
562
668
  # (a,b -> c) -> [a] -> [b] -> [c]
563
669
  #
564
- curried_method(:zip_with) do |fn, xs1, xs2|
565
- xs1.zip(xs2).map { |(a, b)| fn.call(a, b) }
670
+ curried_method(:zip_with) do |f, xs1, xs2|
671
+ xs1.zip(xs2).map { |(a, b)| f.call(a, b) }
566
672
  end
567
673
 
568
674
  # TODO: Extract from this module
@@ -47,6 +47,15 @@ module Ramda
47
47
  then_fn.call(x, *other_x) unless then_fn.nil?
48
48
  end
49
49
 
50
+ # Returns the second argument if it is not null, undefined or NaN;
51
+ # otherwise the first argument is returned.
52
+ #
53
+ # a -> b -> a | b
54
+ #
55
+ curried_method(:default_to) do |a, b|
56
+ b || a
57
+ end
58
+
50
59
  # Creates a function that will process either the onTrue or the onFalse
51
60
  # function depending upon the result of the condition predicate.
52
61
  #
@@ -1,3 +1,3 @@
1
1
  module Ramda
2
- VERSION = '0.9.0'.freeze
2
+ VERSION = '0.10.0'.freeze
3
3
  end
@@ -407,6 +407,34 @@ describe Ramda::Function do
407
407
  end
408
408
  end
409
409
 
410
+ context '#partial' do
411
+ it 'from docs' do
412
+ multiply2 = ->(a, b) { a * b }
413
+ double_fn = R.partial(multiply2, [2])
414
+ expect(double_fn.call(2)).to eq(4)
415
+
416
+ greet = lambda { |salutation, title, first_name, last_name|
417
+ salutation + ', ' + title + ' ' + first_name + ' ' + last_name + '!'
418
+ }
419
+
420
+ say_hello = R.partial(greet, ['Hello'])
421
+ say_hello_to_ms = R.partial(say_hello, ['Ms.'])
422
+ expect(say_hello_to_ms.call('Jane', 'Jones')).to eq('Hello, Ms. Jane Jones!')
423
+ end
424
+ end
425
+
426
+ context '#partial_right' do
427
+ it 'from docs' do
428
+ greet = lambda { |salutation, title, first_name, last_name|
429
+ salutation + ', ' + title + ' ' + first_name + ' ' + last_name + '!'
430
+ }
431
+
432
+ gree_ms_jane_jones = R.partial_right(greet, ['Ms.', 'Jane', 'Jones'])
433
+
434
+ expect(gree_ms_jane_jones.call('Hello')).to eq('Hello, Ms. Jane Jones!')
435
+ end
436
+ end
437
+
410
438
  context '#pipe' do
411
439
  it 'from docs' do
412
440
  classy_greeting = lambda do |first_name, last_name|
@@ -350,6 +350,26 @@ describe Ramda::List do
350
350
  end
351
351
  end
352
352
 
353
+ # context '#map_accum' do
354
+ # it 'from docs' do
355
+ # digits = ['1', '2', '3', '4'];
356
+ # appender = -> (a, b) { [a + b, a + b] }
357
+ #
358
+ # expect(R.map_accum(appender, 0, digits)).to eq(['01234', ['01', '012', '0123', '01234']])
359
+ # end
360
+ # end
361
+
362
+ context '#merge_all' do
363
+ it 'from docs' do
364
+ expect(R.merge_all([{ foo: 1 }, { bar: 2 }, { baz: 3 }])).to eq(foo: 1, bar: 2, baz: 3)
365
+ expect(R.merge_all([{ foo: 1 }, { foo: 2 }, { bar: 2 }])).to eq(foo: 2, bar: 2)
366
+ end
367
+
368
+ it 'curried' do
369
+ expect(R.merge_all.call([{ foo: 1 }, { bar: 2 }])).to eq(foo: 1, bar: 2)
370
+ end
371
+ end
372
+
353
373
  context '#nth' do
354
374
  it 'with array' do
355
375
  list = ['foo', 'bar', 'baz', 'quux']
@@ -469,6 +489,29 @@ describe Ramda::List do
469
489
  end
470
490
  end
471
491
 
492
+ context '#scan' do
493
+ let(:add) { ->(a, b) { a + b } }
494
+ let(:mult) { ->(a, b) { a * b; }; }
495
+
496
+ it 'scans simple functions over arrays with the supplied accumulator' do
497
+ expect(R.scan(add, 0, [1, 2, 3, 4])).to eq([0, 1, 3, 6, 10])
498
+ expect(R.scan(mult, 1, [1, 2, 3, 4])).to eq([1, 1, 2, 6, 24])
499
+ end
500
+
501
+ it 'returns the accumulator for an empty array' do
502
+ expect(R.scan(add, 0, [])).to eq([0])
503
+ expect(R.scan(mult, 1, [])).to eq([1])
504
+ end
505
+
506
+ it 'is curried' do
507
+ add_or_concat = R.scan(add)
508
+ sum = add_or_concat.call(0)
509
+ cat = add_or_concat.call('')
510
+ expect(sum.call([1, 2, 3, 4])).to eq([0, 1, 3, 6, 10])
511
+ expect(cat.call(['1', '2', '3', '4'])).to eq(['', '1', '12', '123', '1234'])
512
+ end
513
+ end
514
+
472
515
  context '#slice' do
473
516
  it 'from docs' do
474
517
  expect(r.slice(1, 3, ['a', 'b', 'c', 'd'])).to eq(['b', 'c'])
@@ -551,6 +594,13 @@ describe Ramda::List do
551
594
  end
552
595
  end
553
596
 
597
+ context '#unfold' do
598
+ it 'from docs' do
599
+ f = ->(n) { n > 50 ? false : [-n, n + 10] }
600
+ expect(R.unfold(f, 10)).to eq([-10, -20, -30, -40, -50])
601
+ end
602
+ end
603
+
554
604
  context '#uniq' do
555
605
  it 'from docs' do
556
606
  expect(r.uniq([1, 1, 2, 1])).to eq([1, 2])
@@ -53,6 +53,15 @@ describe Ramda::Logic do
53
53
  end
54
54
  end
55
55
 
56
+ context '#default_to' do
57
+ it 'from docs' do
58
+ default_to42 = R.default_to(42)
59
+
60
+ expect(default_to42.call(nil)).to eq(42)
61
+ expect(default_to42.call('Ramda')).to eq('Ramda')
62
+ end
63
+ end
64
+
56
65
  context '#if_else' do
57
66
  it 'from docs' do
58
67
  inc_count = R.if_else(
@@ -8,6 +8,8 @@ describe Ramda do
8
8
  end
9
9
 
10
10
  # r(:keys_in)
11
+ # r(:map_accum)
12
+ # r(:map_accum_right)
11
13
  # r(:math_mod)
12
14
  # r(:to_pairs_in)
13
15
  # r(:values_in)
@@ -44,6 +46,7 @@ describe Ramda do
44
46
  r(:curry)
45
47
  r(:curry_n)
46
48
  r(:dec)
49
+ r(:default_to)
47
50
  r(:difference)
48
51
  r(:difference_with)
49
52
  r(:dissoc)
@@ -105,6 +108,7 @@ describe Ramda do
105
108
  r(:max_by)
106
109
  r(:memoize)
107
110
  r(:merge)
111
+ r(:merge_all)
108
112
  r(:min)
109
113
  r(:min_by)
110
114
  r(:modulo)
@@ -119,6 +123,8 @@ describe Ramda do
119
123
  r(:once)
120
124
  r(:or)
121
125
  r(:over)
126
+ r(:partial)
127
+ r(:partial_right)
122
128
  r(:partition)
123
129
  r(:path)
124
130
  r(:path_eq)
@@ -142,6 +148,7 @@ describe Ramda do
142
148
  r(:repeat)
143
149
  r(:replace)
144
150
  r(:reverse)
151
+ r(:scan)
145
152
  r(:set)
146
153
  r(:slice)
147
154
  r(:sort)
@@ -161,6 +168,7 @@ describe Ramda do
161
168
  r(:type)
162
169
  r(:unapply)
163
170
  r(:unary)
171
+ r(:unfold)
164
172
  r(:union)
165
173
  r(:union_with)
166
174
  r(:uniq)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ramda-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vadim Lazebny
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-02 00:00:00.000000000 Z
11
+ date: 2017-07-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby version of Ramda Js library.
14
14
  email:
@@ -33,6 +33,7 @@ files:
33
33
  - lib/ramda/exception_handler.rb
34
34
  - lib/ramda/function.rb
35
35
  - lib/ramda/internal/curried_method.rb
36
+ - lib/ramda/internal/dispatchable.rb
36
37
  - lib/ramda/internal/function_with_arity.rb
37
38
  - lib/ramda/internal/functors.rb
38
39
  - lib/ramda/internal/java/__make_curry_proc__.rb