liquefied 0.6.0 → 0.7.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
  SHA1:
3
- metadata.gz: 07abe7eaa306cdf0434557af810894e649de256d
4
- data.tar.gz: 1bd7c8ada8d13a1b72dcf5f4df92d2f3f8234c76
3
+ metadata.gz: 7f7a90f8d30f3ecc4822d76a0bf6f435148931dc
4
+ data.tar.gz: 43d4b9fecfdd5e77a8a70bcd96a646aeeeabf0bc
5
5
  SHA512:
6
- metadata.gz: ddb2355785e8d75631b3d773807894f2128503f5b3aabf17fa00b9e55c11486ca16b7c660ab48164bf297ca0d167b33a21399eccb8f655e4bb5e774841c80ef9
7
- data.tar.gz: 163ce2931d86abf0888ea8b8d2860cf93ae75f3bca91ce882b7f737b92c88fcb26636b16668468dc56020d78a9ff4eb12a45d1c0644418ed68477126e87db984
6
+ metadata.gz: 3a75b3977ffd7800f995159d5970a852a45c5bb9ea3f9efa1cb18ac925342945aa524e8b380fe03ed4eb9dd96742238abc67576d6dafa1d0e9b60bb1c47ed9d0
7
+ data.tar.gz: 0bfde0981c502a52942524f4a75b91df75020f037c40031eaf393290bba058e1ad985f9ebc21138fe724d6d3c4206157e34c7c931c15203c6be9413dd4e4c80d
data/lib/liquefied.rb CHANGED
@@ -33,7 +33,7 @@ class Liquefied < BasicObject
33
33
  "#<Liquefied(#{@original.class}):#{@original.object_id}>"
34
34
  end
35
35
 
36
- def object
36
+ def itself
37
37
  @original
38
38
  end
39
39
 
@@ -52,7 +52,7 @@ class Liquefied < BasicObject
52
52
  _finalize!(final_method, *args, &block)
53
53
  else
54
54
  result = @original.public_send(method, *args, &block)
55
- if result.class == @original.class && !method.to_s.start_with?(CAST_PREFIX)
55
+ if result.class == @original.class
56
56
  ::Liquefied.new(result, *@default_args, method: @finalizer, &@default_block)
57
57
  else
58
58
  result
@@ -72,8 +72,8 @@ class Liquefied < BasicObject
72
72
  end
73
73
 
74
74
  def _get_finalizer(method)
75
- return method if @finalizer.include?(method)
76
- both = [method, *@finalizer]
75
+ return @finalizer.first if @finalizer.include?(method)
76
+ both = [*@finalizer, method]
77
77
  aliases = METHOD_ALIASES.find { |m| (m & both).size >= 2 }
78
78
  aliases.find { |m| @original.respond_to?(m, true) } if aliases
79
79
  end
@@ -1,3 +1,3 @@
1
1
  class Liquefied < BasicObject
2
- VERSION = "0.6.0"
2
+ VERSION = "0.7.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liquefied
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Vit
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-19 00:00:00.000000000 Z
11
+ date: 2016-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler