rudash 3.0.6 → 3.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2105b659ae278409b0f37abe85883fe055c8e47c623dce194ecd22d178de0aee
4
- data.tar.gz: baa66c67d719fb0237ab5d23529c233e185c45f977513850baa2be5dea47e095
3
+ metadata.gz: 9dc2c29db4b71e43141cac51c0323b524bd47b6a85a692654e58334bcef5da16
4
+ data.tar.gz: 94f2615e152498e46b91abe25619b41b6aa4922a69ad1393fa641aa83fb388ed
5
5
  SHA512:
6
- metadata.gz: 603d4fc50c6db8ca90fd605d1c4c32d79583eb7b42a63f3d2c8c55d888b954dd3583aaa6c65eddc71465be700a37bc6c2df5db8b74e1b22fe9a027c534f98635
7
- data.tar.gz: 216ae01f7dff095fa06dedbbcfdc0e60fe272e6e44695adbb49a22cb9b5d40359c44b7030eaf4dc3bddc15b8a0e42b79303e00f4afdbce1a826e2850195b4cb8
6
+ metadata.gz: 16911c7d2cee5a440e226759c3667e4385115d6ff177f9e8a39585510568193ba6f4f4b1634c372e44dfc39d5925d8919af1d3c413c7f9656b9b551a674b566f
7
+ data.tar.gz: 3ac60f1e2e8c21900fb786b37440fdc5f3bbc2fc66109b930a763ba9b022b1f4bcedc7186a2fb9a8d9225a19e02e947fe132735262df59cb7f157c03df63794b
@@ -1,7 +1,7 @@
1
1
  module Rudash
2
2
  module Curry
3
- def curry(a_proc)
4
- a_proc.is_a?(Proc) ? a_proc.curry : (raise 'Expected a Proc')
3
+ def curry(a_lambda)
4
+ a_lambda.is_a?(Proc) ? a_lambda.curry : (raise 'Expected a Lambda')
5
5
  end
6
6
  end
7
7
  end
@@ -1,12 +1,12 @@
1
1
  module Rudash
2
2
  module Flip
3
- def flip(a_proc)
4
- raise 'Expected a Proc/Method' unless Rudash::Utils.function?(a_proc)
3
+ def flip(a_lambda)
4
+ raise 'Expected a lambda/Method' unless Rudash::Utils.function?(a_lambda)
5
5
 
6
6
  ->(*args) {
7
7
  reveresed_args = args.reverse
8
8
 
9
- a_proc.call(*reveresed_args)
9
+ a_lambda.call(*reveresed_args)
10
10
  }
11
11
  end
12
12
  end
@@ -1,9 +1,9 @@
1
1
  module Rudash
2
2
  module Negate
3
- def negate(a_proc)
4
- raise 'Expected a Proc/Method' unless Rudash::Utils.function?(a_proc)
3
+ def negate(a_lambda)
4
+ raise 'Expected a lambda/Method' unless Rudash::Utils.function?(a_lambda)
5
5
 
6
- ->(*args) { !a_proc.call(*args) }
6
+ ->(*args) { !a_lambda.call(*args) }
7
7
  end
8
8
  end
9
9
  end
@@ -3,7 +3,7 @@
3
3
  # once you configured a function with a specific set of arguments then you must call it with that
4
4
  # set or else you will get an exception.
5
5
  # That is so useful for predicate functions that developer define out of the library scope.
6
- # We send all the arguments to the developer defined Proc and if it's failed
6
+ # We send all the arguments to the developer defined lambda and if it's failed
7
7
  # because of ArgumentError we call it recursively with less argument until success.
8
8
 
9
9
  module Rudash
@@ -34,7 +34,7 @@ module Rudash
34
34
  })
35
35
 
36
36
  # That was done for performance manners since
37
- # R_.each don't stop when returning false from the proc
37
+ # R_.each don't stop when returning false from the lambda
38
38
  # so we force it to stop by throwing an exception that we catch later
39
39
  # It's the same hack for JavaScript forEach function.
40
40
  raise if match == false
@@ -1,3 +1,3 @@
1
1
  module Rudash
2
- VERSION = '3.0.6'.freeze
2
+ VERSION = '3.0.7'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rudash
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.6
4
+ version: 3.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Islam Attrash