rudash 1.0.1 → 2.0.0

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: 4f3d9b2fe15785f6ec8af82fe83004389480d09ae1f7bf28b2ddd2dfb78848ff
4
- data.tar.gz: 32acbf126ee0347108358cffb3bb384e846600ee12fca75a8f1e3f005d4443bc
3
+ metadata.gz: ac304ebb2e93011c388f160fe27b4373ea974ed0cebd69db708fae496f62fb8a
4
+ data.tar.gz: e020fe5ab2d6d3eb6b68f4a1aacfc99bc6bfea56bed39ca81749b6b5114703c7
5
5
  SHA512:
6
- metadata.gz: 3ed733d8314d31eb20548f2abc060bc62320f2457c4d0a516042faf279199b9ed86333ff0fd9fe1de2bdf5e5a15315b30a5e4d58855c5a2ddd78a76d306cd207
7
- data.tar.gz: 61b27fda3e86b8e456fda04e3f4f1c6881274855ae7dc5e9026662bbe4ee29565e0773edf29ce3b757949fa14e4f099da97f81c0cbf835c870b0254ccefed4c1
6
+ metadata.gz: b8a04cb55a0dedcc788683fd6d40403422e1139d4a96910a28d8e473ea4c088b9826740d59e9c9b7cf33545b0f2c5983177c60bdaf94eb5de2afb6f595ab0ae2
7
+ data.tar.gz: 03825a7e60bcfd1436e960f7258c65537518a2265b7d24d2ed8943fd0e4cbbdd886571dae28c8d193dd5f3a0b11dfe317f61dd934647956d9a8769760b5b1a17
data/lib/rudash/at.rb ADDED
@@ -0,0 +1,15 @@
1
+ require_relative 'get.rb'
2
+ require_relative 'map.rb'
3
+
4
+ module At
5
+ extend Get
6
+ extend Map
7
+
8
+ def at(object, paths)
9
+ get_mapper = -> (path) {
10
+ self.get(object, path)
11
+ }
12
+
13
+ self.map(paths, get_mapper)
14
+ end
15
+ end
@@ -3,10 +3,8 @@ require_relative 'is_nil.rb'
3
3
  module Compact
4
4
  extend IsNil
5
5
 
6
- def compact
7
- compact_proc = -> (array) {
8
- return [] if !array.is_a?(Array)
9
- array.compact
10
- }
6
+ def compact(array)
7
+ return [] if !array.is_a?(Array)
8
+ array.compact
11
9
  end
12
10
  end
data/lib/rudash/concat.rb CHANGED
@@ -3,14 +3,12 @@ require_relative 'is_nil.rb'
3
3
  module Concat
4
4
  extend IsNil
5
5
 
6
- def concat
7
- concat_proc = -> (head, *values) {
8
- head_arr = head.is_a?(Array) ? head : [head]
9
- if values.size == 0
10
- return head_arr
11
- else
12
- return head_arr + self.concat[*values]
13
- end
14
- }
6
+ def concat(head, *values)
7
+ head_arr = head.is_a?(Array) ? head : [head]
8
+ if values.size == 0
9
+ return head_arr
10
+ else
11
+ return head_arr + self.concat(*values)
12
+ end
15
13
  end
16
14
  end
data/lib/rudash/curry.rb CHANGED
@@ -1,13 +1,10 @@
1
1
  module Curry
2
- def curry
3
- curry_proc = -> (a_proc) {
4
- case a_proc
5
- when Proc
6
- a_proc.curry
7
- else
8
- raise 'Expected a Proc'
9
- end
10
- a_proc.curry
11
- }
2
+ def curry(a_proc)
3
+ case a_proc
4
+ when Proc
5
+ a_proc.curry
6
+ else
7
+ raise 'Expected a Proc'
8
+ end
12
9
  end
13
10
  end
@@ -3,16 +3,14 @@ require_relative 'reduce.rb'
3
3
  module Difference
4
4
  extend Reduce
5
5
 
6
- def difference
7
- difference_proc = -> (*values) {
8
- diff_reducer = -> (acc, current) {
9
- return [] if !acc.is_a?(Array)
10
- return acc if !current.is_a?(Array)
6
+ def difference(*values)
7
+ diff_reducer = -> (acc, current) {
8
+ return [] if !acc.is_a?(Array)
9
+ return acc if !current.is_a?(Array)
11
10
 
12
- acc - current
13
- }
14
-
15
- self.reduce[values, diff_reducer]
11
+ acc - current
16
12
  }
13
+
14
+ self.reduce(values, diff_reducer)
17
15
  end
18
16
  end
data/lib/rudash/each.rb CHANGED
@@ -3,14 +3,12 @@ require_relative 'map.rb'
3
3
  module Each
4
4
  extend Map
5
5
 
6
- def each
7
- each_proc = -> (collection, *rest_args) {
8
- self.map[collection, *rest_args]
9
- collection
10
- }
6
+ def each(collection, *rest_args)
7
+ self.map(collection, *rest_args)
8
+ collection
11
9
  end
12
10
 
13
- def for_each
14
- self.each
11
+ def for_each(*args)
12
+ self.each(*args)
15
13
  end
16
14
  end
@@ -0,0 +1,22 @@
1
+ require_relative 'each.rb'
2
+
3
+ module EachRight
4
+ extend Each
5
+
6
+ def each_right(collection, *rest_args)
7
+ reversed_collection =
8
+ case collection
9
+ when Array then collection.reverse
10
+ when Hash then collection.reverse_each.to_h
11
+ when String then collection.reverse
12
+ else []
13
+ end
14
+
15
+ self.each(reversed_collection, *rest_args)
16
+ collection
17
+ end
18
+
19
+ def for_each_right(*args)
20
+ self.each_right(*args)
21
+ end
22
+ end
data/lib/rudash/eq.rb ADDED
@@ -0,0 +1,5 @@
1
+ module Eq
2
+ def eq?(object, other)
3
+ object.equal?(other)
4
+ end
5
+ end
data/lib/rudash/every.rb CHANGED
@@ -3,11 +3,8 @@ require_relative 'filter.rb'
3
3
  module Every
4
4
  extend Filter
5
5
 
6
- def every?
7
- every_proc = -> (array, filter) {
8
- filtered_arr = self.filter[array, filter]
9
-
10
- filtered_arr.length == array.length
11
- }
6
+ def every?(array, filter)
7
+ filtered_arr = self.filter(array, filter)
8
+ filtered_arr.length == array.length
12
9
  end
13
10
  end
data/lib/rudash/filter.rb CHANGED
@@ -7,42 +7,40 @@ module Filter
7
7
  extend Identity
8
8
  extend Head
9
9
 
10
- def filter
11
- filter_proc = -> (collection, *rest_args) {
12
- filter = self.head[rest_args] || self.identity
10
+ def filter(collection, *rest_args)
11
+ filter = self.head(rest_args) || self.method(:identity)
13
12
 
14
- if collection.is_a?(Array) and filter.is_a?(Hash)
15
- filtered_arr = []
16
- collection.each do |v|
17
- match = true
18
- filter.each do |key, value|
19
- if (value != v[key])
20
- match = false
21
- break
22
- end
23
- end
24
-
25
- if (match == true)
26
- filtered_arr << v
13
+ if collection.is_a?(Array) and filter.is_a?(Hash)
14
+ filtered_arr = []
15
+ collection.each do |v|
16
+ match = true
17
+ filter.each do |key, value|
18
+ if (value != v[key])
19
+ match = false
20
+ break
27
21
  end
28
22
  end
29
23
 
30
- return filtered_arr
31
- elsif collection.is_a?(Array)
32
- if filter.arity == 1
33
- return collection.select { |x| filter[x] }
34
- else
35
- return collection.select.with_index { |x, idx| filter[x, idx] }
36
- end
37
- elsif collection.is_a?(Hash)
38
- if filter.arity == 1
39
- return collection.select { |k, v| filter[v] }
40
- else
41
- return collection.select { |k, v| filter[v, k] }
24
+ if (match == true)
25
+ filtered_arr << v
42
26
  end
27
+ end
28
+
29
+ return filtered_arr
30
+ elsif collection.is_a?(Array)
31
+ if filter.arity == 1
32
+ return collection.select { |x| filter[x] }
33
+ else
34
+ return collection.select.with_index { |x, idx| filter[x, idx] }
35
+ end
36
+ elsif collection.is_a?(Hash)
37
+ if filter.arity == 1
38
+ return collection.select { |k, v| filter[v] }
43
39
  else
44
- return []
40
+ return collection.select { |k, v| filter[v, k] }
45
41
  end
46
- }
42
+ else
43
+ return []
44
+ end
47
45
  end
48
46
  end
data/lib/rudash/find.rb CHANGED
@@ -7,12 +7,10 @@ module Find
7
7
  extend Head
8
8
  extend Identity
9
9
 
10
- def find
11
- find_proc = -> (collection, *rest_args) {
12
- filter_proc = self.head[rest_args] || self.identity
13
- filtered_arr = self.filter[collection, filter_proc]
14
-
15
- filtered_arr[0]
16
- }
10
+ def find(collection, *rest_args)
11
+ filter_proc = self.head(rest_args) || self.method(:identity)
12
+ filtered_arr = self.filter(collection, filter_proc)
13
+
14
+ filtered_arr[0]
17
15
  end
18
16
  end
@@ -1,14 +1,14 @@
1
1
  require_relative 'filter.rb'
2
+ require_relative 'identity.rb'
2
3
 
3
4
  module FindLast
4
5
  extend Filter
6
+ extend Identity
5
7
 
6
- def find_last
7
- find_last_proc = -> (collection, *rest_args) {
8
- filter_proc = self.head[rest_args] || self.identity
9
- filtered_arr = self.filter[collection, filter_proc]
10
-
11
- filtered_arr[filtered_arr.length - 1]
12
- }
8
+ def find_last(collection, *rest_args)
9
+ filter_proc = self.head(rest_args) || self.method(:identity)
10
+ filtered_arr = self.filter(collection, filter_proc)
11
+
12
+ filtered_arr[filtered_arr.length - 1]
13
13
  end
14
14
  end
data/lib/rudash/flip.rb CHANGED
@@ -1,11 +1,9 @@
1
1
  module Flip
2
- def flip
3
- flip_proc = -> (a_proc) {
4
- flipped_proc = -> (*args) {
5
- reveresed_args = args.reverse
2
+ def flip(a_proc)
3
+ flipped_proc = -> (*args) {
4
+ reveresed_args = args.reverse
6
5
 
7
- a_proc[*reveresed_args]
8
- }
6
+ a_proc[*reveresed_args]
9
7
  }
10
8
  end
11
9
  end
data/lib/rudash/get.rb CHANGED
@@ -1,42 +1,47 @@
1
1
  require_relative 'reduce.rb'
2
+ require_relative 'filter.rb'
2
3
 
3
4
  module Get
4
5
  extend Reduce
6
+ extend Filter
5
7
 
6
- def get
7
- get_proc = -> (hash, path, *rest_args) {
8
- return nil if !path.is_a?(String) and !path.is_a?(Array)
9
- return nil if !hash.is_a?(Array) and !hash.is_a?(Hash)
8
+ def get(hash, path, *rest_args)
9
+ return nil if !path.is_a?(String) and !path.is_a?(Array)
10
+ return nil if !hash.is_a?(Array) and !hash.is_a?(Hash)
10
11
 
11
- transform_path = -> (path) {
12
- normalized_path = path
12
+ transform_path = -> (path) {
13
+ normalized_path = path
13
14
 
14
- if normalized_path.is_a?(Array)
15
- normalized_path = normalized_path.join('.')
16
- end
15
+ if normalized_path.is_a?(Array)
16
+ normalized_path = normalized_path.join('.')
17
+ end
17
18
 
18
- normalized_path = normalized_path.gsub /[\[\]]/, "."
19
- normalized_path = normalized_path.gsub /\.\./, "."
20
- splitted_hash = normalized_path.split('.')
19
+ filter_not_empty = -> (value) {
20
+ value != ''
21
21
  }
22
22
 
23
- splitted_hash = transform_path[path]
24
-
25
- get_reducer = -> (acc, current) {
26
- return nil if acc.nil?
27
-
28
- if acc.is_a?(Array) and current.match(/^(\d)+$/)
29
- acc[current.to_i]
30
- elsif acc.is_a?(Array) and !current.match(/^(\d)+$/)
31
- nil
32
- elsif acc.is_a?(Hash)
33
- acc[current.to_sym]
34
- else
35
- nil
36
- end
37
- }
23
+ splitted_hash = self.filter(
24
+ normalized_path.split(/[.\[\]]/),
25
+ filter_not_empty
26
+ )
27
+ }
38
28
 
39
- self.reduce[splitted_hash, get_reducer, hash]
29
+ splitted_hash = transform_path[path]
30
+
31
+ get_reducer = -> (acc, current) {
32
+ return nil if acc.nil?
33
+
34
+ if acc.is_a?(Array) and current.match(/^(\d)+$/)
35
+ acc[current.to_i]
36
+ elsif acc.is_a?(Array) and !current.match(/^(\d)+$/)
37
+ nil
38
+ elsif acc.is_a?(Hash)
39
+ acc[current.to_sym] || acc[current]
40
+ else
41
+ nil
42
+ end
40
43
  }
44
+
45
+ self.reduce(splitted_hash, get_reducer, hash)
41
46
  end
42
47
  end
data/lib/rudash/head.rb CHANGED
@@ -1,12 +1,10 @@
1
1
  module Head
2
- def head
3
- head_proc = -> (array) {
4
- return nil if !array.is_a?(Array)
5
- array.first
6
- }
2
+ def head(array)
3
+ return nil if !array.is_a?(Array)
4
+ array.first
7
5
  end
8
6
 
9
- def first
10
- self.head
7
+ def first(*args)
8
+ self.head(*args)
11
9
  end
12
10
  end
@@ -1,5 +1,5 @@
1
1
  module Identity
2
- def identity
3
- identity_proc = -> (first_arg, *rest_args) { first_arg }
2
+ def identity(first_arg, *rest_args)
3
+ first_arg
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  module IsArray
2
- def is_array?
3
- is_array_proc = -> (value) { value.is_a?(Array) }
2
+ def is_array?(value)
3
+ value.is_a?(Array)
4
4
  end
5
5
  end
@@ -1,12 +1,10 @@
1
1
  module IsEmpty
2
- def is_empty?
3
- is_empty_proc = -> (value) {
4
- case value
5
- when Hash, Array
6
- value.empty?
7
- else
8
- true
9
- end
10
- }
2
+ def is_empty?(value)
3
+ case value
4
+ when Hash, Array
5
+ value.empty?
6
+ else
7
+ true
8
+ end
11
9
  end
12
10
  end
@@ -1,5 +1,5 @@
1
1
  module IsEqual
2
- def is_equal?
3
- is_equal_proc = -> (value, other) { value == other }
2
+ def is_equal?(value, other)
3
+ value == other
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  module IsHash
2
- def is_hash?
3
- is_hash_proc = -> (value) { value.is_a?(Hash) }
2
+ def is_hash?(value)
3
+ value.is_a?(Hash)
4
4
  end
5
5
  end
data/lib/rudash/is_nil.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module IsNil
2
- def is_nil?
3
- is_nil_proc = -> (object) { object.nil? }
2
+ def is_nil?(object)
3
+ object.nil?
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  module IsNumber
2
- def is_number?
3
- is_number_proc = -> (value) { value.is_a?(Numeric) }
2
+ def is_number?(value)
3
+ value.is_a?(Numeric)
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  module IsProc
2
- def is_proc?
3
- is_proc_proc = -> (value) { value.is_a?(Proc) }
2
+ def is_proc?(value)
3
+ value.is_a?(Proc)
4
4
  end
5
5
  end
@@ -0,0 +1,10 @@
1
+ module IsString
2
+ def is_string?(object)
3
+ case object
4
+ when String
5
+ true
6
+ else
7
+ false
8
+ end
9
+ end
10
+ end
data/lib/rudash/keys.rb CHANGED
@@ -1,14 +1,12 @@
1
1
  module Keys
2
- def keys
3
- keys_proc = -> (value) {
4
- case value
5
- when Hash
6
- value.map { |key, value| "#{key}" }
7
- when Array
8
- value.map.with_index { |value, index| "#{index}" }
9
- else
10
- []
11
- end
12
- }
2
+ def keys(value)
3
+ case value
4
+ when Hash
5
+ value.map { |key, value| "#{key}" }
6
+ when Array
7
+ value.map.with_index { |value, index| "#{index}" }
8
+ else
9
+ []
10
+ end
13
11
  end
14
12
  end
data/lib/rudash/last.rb CHANGED
@@ -1,8 +1,6 @@
1
1
  module Last
2
- def last
3
- last_proc = -> (array) {
4
- return nil if !array.is_a?(Array)
5
- array.last
6
- }
2
+ def last(array)
3
+ return nil if !array.is_a?(Array)
4
+ array.last
7
5
  end
8
6
  end
data/lib/rudash/map.rb CHANGED
@@ -1,22 +1,26 @@
1
+ require_relative 'head.rb'
2
+ require_relative 'identity.rb'
3
+
1
4
  module Map
2
- def map
3
- map_proc = -> (collection, *rest_args) {
4
- mapper_proc = self.head[rest_args] || self.identity
5
+ extend Head
6
+ extend Identity
7
+
8
+ def map(collection, *rest_args)
9
+ mapper_proc = self.head(rest_args) || self.method(:identity)
5
10
 
6
- col = collection.is_a?(String) ? collection.split('') : collection
11
+ col = collection.is_a?(String) ? collection.split('') : collection
7
12
 
8
- if col.is_a?(Array)
9
- return mapper_proc.arity == 1 ?
10
- col.map { |value| mapper_proc[value] } :
11
- col.map.with_index { |value, index| mapper_proc[value, index] }
13
+ if col.is_a?(Array)
14
+ return mapper_proc.arity == 1 ?
15
+ col.map { |value| mapper_proc[value] } :
16
+ col.map.with_index { |value, index| mapper_proc[value, index] }
12
17
 
13
- elsif col.is_a?(Hash)
14
- return mapper_proc.arity == 1 ?
15
- col.map { |k,v| mapper_proc[v] } :
16
- col.map { |k,v| mapper_proc[v, k] }
17
- else
18
- return []
19
- end
20
- }
18
+ elsif col.is_a?(Hash)
19
+ return mapper_proc.arity == 1 ?
20
+ col.map { |k,v| mapper_proc[v] } :
21
+ col.map { |k,v| mapper_proc[v, k] }
22
+ else
23
+ return []
24
+ end
21
25
  end
22
26
  end
@@ -0,0 +1,12 @@
1
+ module Negate
2
+ def negate(a_proc)
3
+ case a_proc
4
+ when Proc
5
+ negate_proc = -> (*args) {
6
+ !a_proc[*args]
7
+ }
8
+ else
9
+ raise 'Expected a Proc'
10
+ end
11
+ end
12
+ end
data/lib/rudash/reduce.rb CHANGED
@@ -1,35 +1,33 @@
1
1
  module Reduce
2
- def reduce
3
- reduce_proc = -> (collection, *rest_args) {
4
- reducer = rest_args[0]
5
- initial_state = rest_args[1]
2
+ def reduce(collection, *rest_args)
3
+ reducer = rest_args[0]
4
+ initial_state = rest_args[1]
6
5
 
7
- col = collection.is_a?(String) ? collection.split('') : collection
6
+ col = collection.is_a?(String) ? collection.split('') : collection
8
7
 
9
- case rest_args.size
10
- when 1
11
- return col.reduce { |acc, current|
12
- if col.is_a?(Hash)
13
- reducer.arity == 2 ?
14
- reducer[acc, current[1]] :
15
- reducer[acc, current[1], current[0]]
16
- else
17
- reducer[acc, current]
18
- end
19
- }
20
- when 2
21
- return col.reduce(initial_state) { |acc, current|
22
- if col.is_a?(Hash)
23
- reducer.arity == 2 ?
24
- reducer[acc, current[1]] :
25
- reducer[acc, current[1], current[0]]
26
- else
27
- reducer[acc, current]
28
- end
29
- }
30
- else
31
- return nil
32
- end
33
- }
8
+ case rest_args.size
9
+ when 1
10
+ return col.reduce { |acc, current|
11
+ if col.is_a?(Hash)
12
+ reducer.arity == 2 ?
13
+ reducer[acc, current[1]] :
14
+ reducer[acc, current[1], current[0]]
15
+ else
16
+ reducer[acc, current]
17
+ end
18
+ }
19
+ when 2
20
+ return col.reduce(initial_state) { |acc, current|
21
+ if col.is_a?(Hash)
22
+ reducer.arity == 2 ?
23
+ reducer[acc, current[1]] :
24
+ reducer[acc, current[1], current[0]]
25
+ else
26
+ reducer[acc, current]
27
+ end
28
+ }
29
+ else
30
+ return nil
31
+ end
34
32
  end
35
33
  end
@@ -3,17 +3,15 @@ require_relative 'reduce.rb'
3
3
  module ReduceRight
4
4
  extend Reduce
5
5
 
6
- def reduce_right
7
- reduce_right_proc = -> (collection, *rest_args) {
8
- reversed_collection =
9
- case collection
10
- when Array then collection.reverse
11
- when Hash then collection.reverse_each.to_h
12
- when String then collection.reverse
13
- else []
14
- end
6
+ def reduce_right(collection, *rest_args)
7
+ reversed_collection =
8
+ case collection
9
+ when Array then collection.reverse
10
+ when Hash then collection.reverse_each.to_h
11
+ when String then collection.reverse
12
+ else []
13
+ end
15
14
 
16
- self.reduce[reversed_collection, *rest_args]
17
- }
15
+ self.reduce(reversed_collection, *rest_args)
18
16
  end
19
17
  end
@@ -1,12 +1,10 @@
1
1
  module Reverse
2
- def reverse
3
- reverse_proc = -> (value) {
4
- case value
5
- when Array, String
6
- value.reverse
7
- else
8
- value
9
- end
10
- }
2
+ def reverse(value)
3
+ case value
4
+ when Array, String
5
+ value.reverse
6
+ else
7
+ value
8
+ end
11
9
  end
12
10
  end
data/lib/rudash/size.rb CHANGED
@@ -3,11 +3,8 @@ require_relative 'is_nil.rb'
3
3
  module Size
4
4
  extend IsNil
5
5
 
6
- def size
7
- size_proc = -> (something) {
8
- return 0 if self.is_nil?[something]
9
-
10
- something.size
11
- }
6
+ def size(something)
7
+ return 0 if self.is_nil?(something)
8
+ something.size
12
9
  end
13
10
  end
data/lib/rudash/some.rb CHANGED
@@ -3,10 +3,8 @@ require_relative 'filter.rb'
3
3
  module Some
4
4
  extend Filter
5
5
 
6
- def some?
7
- some_proc = -> (array, filter) {
8
- filtered_arr = self.filter[array, filter]
9
- filtered_arr.length != 0
10
- }
6
+ def some?(array, filter)
7
+ filtered_arr = self.filter(array, filter)
8
+ filtered_arr.length != 0
11
9
  end
12
10
  end
data/lib/rudash/tail.rb CHANGED
@@ -1,8 +1,6 @@
1
1
  module Tail
2
- def tail
3
- tail_proc = -> (array) {
4
- return [] if !array.is_a?(Array)
5
- array[1..-1] || []
6
- }
2
+ def tail(array)
3
+ return [] if !array.is_a?(Array)
4
+ array[1..-1] || []
7
5
  end
8
6
  end
data/lib/rudash/uniq.rb CHANGED
@@ -1,14 +1,12 @@
1
1
  module Uniq
2
- def uniq
3
- uniq_proc = -> (value) {
4
- case value
5
- when String
6
- uniq_proc[value.split('')]
7
- when Array
8
- value.uniq
9
- else
10
- []
11
- end
12
- }
2
+ def uniq(value)
3
+ case value
4
+ when String
5
+ self.uniq(value.split(''))
6
+ when Array
7
+ value.uniq
8
+ else
9
+ []
10
+ end
13
11
  end
14
12
  end
data/lib/rudash.rb CHANGED
@@ -28,6 +28,11 @@ require_relative './rudash/keys.rb'
28
28
  require_relative './rudash/each.rb'
29
29
  require_relative './rudash/uniq.rb'
30
30
  require_relative './rudash/difference.rb'
31
+ require_relative './rudash/is_string.rb'
32
+ require_relative './rudash/eq.rb'
33
+ require_relative './rudash/each_right.rb'
34
+ require_relative './rudash/at.rb'
35
+ require_relative './rudash/negate.rb'
31
36
 
32
37
  class R_
33
38
  extend Map
@@ -60,4 +65,9 @@ class R_
60
65
  extend Each
61
66
  extend Uniq
62
67
  extend Difference
68
+ extend IsString
69
+ extend Eq
70
+ extend EachRight
71
+ extend At
72
+ extend Negate
63
73
  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: 1.0.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Islam Attrash
@@ -17,11 +17,14 @@ extensions: []
17
17
  extra_rdoc_files: []
18
18
  files:
19
19
  - lib/rudash.rb
20
+ - lib/rudash/at.rb
20
21
  - lib/rudash/compact.rb
21
22
  - lib/rudash/concat.rb
22
23
  - lib/rudash/curry.rb
23
24
  - lib/rudash/difference.rb
24
25
  - lib/rudash/each.rb
26
+ - lib/rudash/each_right.rb
27
+ - lib/rudash/eq.rb
25
28
  - lib/rudash/every.rb
26
29
  - lib/rudash/filter.rb
27
30
  - lib/rudash/find.rb
@@ -37,9 +40,11 @@ files:
37
40
  - lib/rudash/is_nil.rb
38
41
  - lib/rudash/is_number.rb
39
42
  - lib/rudash/is_proc.rb
43
+ - lib/rudash/is_string.rb
40
44
  - lib/rudash/keys.rb
41
45
  - lib/rudash/last.rb
42
46
  - lib/rudash/map.rb
47
+ - lib/rudash/negate.rb
43
48
  - lib/rudash/reduce.rb
44
49
  - lib/rudash/reduce_right.rb
45
50
  - lib/rudash/reverse.rb