mobj 2.7.0 → 2.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZGYzMGM1NGMwODdkZjcwODNlOWNiZWJkNmQ4YjE3ZjlkODIzZGNjOQ==
4
+ NDEzOGZhZDEzMDk0NDYyYWQ5N2Q2ZTEzNjIzNmRlMmJjZTg0OTU1Nw==
5
5
  data.tar.gz: !binary |-
6
- MmY2NjNhZWEwYTBhMWUzZDk1MTdkYjdlOTZmMTFiNWVkOTcwMzk4ZA==
6
+ ZjFhMmQyYjBiMzc4MWU1Yjg4MTY1ZWU2NjI5MmU4ODQwNjRjNGRjNA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NzY5MzM5MTM3Y2QyYzY5YzE2NDRjODM2NGRkYmMzYTUzY2FmMmFhMmE5ZjJk
10
- Y2JlYTkyZjkxMDEyZWQ5ODEwYjNjMDEwNGY4YTI1MTQ1NThiNWRmZDc5OGJh
11
- NjMxMWNmYjgxN2Y5MGE1YzMxNGNkMzBmMmI3MzRiMDZkYjZjZDA=
9
+ NWZjZTg3YWVkYzk0YjlkNTNhNzI2MDY2NGQxYTdjN2JmMTM0ZWUyYmE2ZWQ1
10
+ YzlhNDBjYzI5ZjEzMjcwNDgwZTkyZTYxYzFjNzYzM2FjZjAzM2ZiMGJhMDM1
11
+ NDAyN2JlZjg5ODc2OGFiMThmODc4ZWI4NjBhZmQyMGYyZDQyYWI=
12
12
  data.tar.gz: !binary |-
13
- NzY2YTdmODM2ZDRiYWNmNTgzZjU0YjAxNDE1MTJmNjYwMTdiNzg4NDdlOGQz
14
- ODlmZDRkYTk2ZjRmOTU0MmIyZmJmZmEzZTFlMGRjOTVlZDc1NmZmNzEwNzM4
15
- MGZkZTVkY2MxYzdiZTljZDI5YmVhZGFlMjZlMGNjZWE2ZjcwZDg=
13
+ ZjE3NTk0YzI1ZDE1NzU3ZGM5NzI3MWYwNzI5NmUxOGZlNWNjZDA1ODg3YzBl
14
+ MWRlMmI4Y2FkYmUwMTMyNDI2ZGViZmY5YTdiZjM2MjZhNTI3MTFmNDMzYmE4
15
+ Mjk1YmMyYzYxOTA1NmU3NmNkNWEyMzllMmFmMjhjNzBmMTYwYTg=
@@ -4,7 +4,13 @@ module Mobj
4
4
  alias responds_to? respond_to?
5
5
 
6
6
  def sym()
7
- respond_to?(:to_sym) ? to_sym : to_s.to_sym
7
+ if is_a?(Symbol)
8
+ self
9
+ elsif respond_to?(:to_sym)
10
+ to_sym
11
+ else
12
+ to_s.to_sym
13
+ end
8
14
  end
9
15
 
10
16
  def __mobj__root()
@@ -4,6 +4,11 @@ module Mobj
4
4
  def walk(obj)
5
5
  to_s.walk(obj)
6
6
  end
7
+
8
+ def method_missing(name, *args, &block)
9
+ str = to_s
10
+ str.respond_to?(name) ? str.send(name, *args, &block) : super
11
+ end
7
12
  end
8
13
 
9
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobj
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.0
4
+ version: 2.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mason