hash_shortcut 0.0.1

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/hash_shortcut.rb +10 -0
  3. metadata +44 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a7ea1025a43d8e0fb8155564ab9e07596f38c3a4
4
+ data.tar.gz: aea570a5c71b7d921229c100884c3cf551658145
5
+ SHA512:
6
+ metadata.gz: 402e39a70a8f3ebc61168d908c10cafb2253833e9301f7069753dd905bd18e84e858e47a495ea1b5ae2f7eb5ed47740e3a0418ab3853128e0de6d12863eba4c3
7
+ data.tar.gz: 4889d535f69ddbbf8be69a83140f113407ec703d5f8866f7b5005b8a339774f19e25a6221e5918a7a30811f022852b29186126770fc5faf24dea796faf9d17d0
@@ -0,0 +1,10 @@
1
+ module HashShortcut
2
+ VERSION = "0.0.1"
3
+ end
4
+
5
+ class Array
6
+ def to_proc
7
+ raise ArgumentError.new "wrong number of arguments" unless length == 1
8
+ proc { |obj| obj[first] }
9
+ end
10
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hash_shortcut
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - dalexj
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-12-28 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Adds a shortcut to access hash values in a block
14
+ email: 96dalex@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/hash_shortcut.rb
20
+ homepage: https://github.com/dalexj/hash_shortcut
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.4.5.1
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: ''
44
+ test_files: []