diablillo 0.0.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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/diablillo.rb +29 -0
  3. metadata +44 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 51d8516f14bf81ab2a30b184b93c09ac000014be
4
+ data.tar.gz: aa32ad6fff3d2ae63a09ad87a0220253c72edaf1
5
+ SHA512:
6
+ metadata.gz: f7c25871a5167636f068759d8887f0b2182c6ae57f039cc96a086ab78e02d02db2d34e084939b2039cadc3f336c274002f4ba117161f8a59df6a10bd65b55157
7
+ data.tar.gz: 9eeaa56d0044c7de1f417fc960dfb4d0378122bb19f86bf93a89dfc8549974639c330c1d1de89b14acbc2d2435aa0b648d88acdc307e8302473bf428fdd8e5c7
@@ -0,0 +1,29 @@
1
+ class Object
2
+
3
+ alias_method :old_method_missing, :method_missing
4
+
5
+ def method_missing(method, *args, &block)
6
+ return old_method_missing(method, *args, &block) unless __¿calificado?(method)
7
+
8
+ gringo = method.to_s.gsub(/^[¿¡]/, '').to_sym
9
+ if respond_to? gringo
10
+ send(gringo, *args, &block)
11
+ else
12
+ old_method_missing(method, *args, &block)
13
+ end
14
+ end
15
+
16
+ private
17
+
18
+ def __¿calificado?(method)
19
+ __inversions[ method[0] ] == method[-1]
20
+ end
21
+
22
+ def __inversions
23
+ {
24
+ '¿' => '?',
25
+ '¡' => '!',
26
+ }
27
+ end
28
+
29
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: diablillo
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - jefk
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-11-27 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Call methods with the diablillo!
14
+ email:
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/diablillo.rb
20
+ homepage: http://github.com/jefk/diablillo
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.1.5
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Diablillo!
44
+ test_files: []