lab42_core 0.0.2 → 0.0.3

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: e11f89610f33fe0d3b0adaeeeb51aec8f6d1f3b8
4
- data.tar.gz: 864f519dc4f855c8601b26ed967169f5b34188d6
3
+ metadata.gz: 23fa2e410ba0d5674710a2c25c39b47b763f8516
4
+ data.tar.gz: 1af39297215e537342b4f1cc0adb303c2ac2dedb
5
5
  SHA512:
6
- metadata.gz: 0d638794dbc237460697cafe85360f7b6cdc91703134b106a99bd9356891408e81cc6cbd168f7f8e92ca9cf1dba70224230724729391dd130157a3d23408f5bf
7
- data.tar.gz: df554a6854136498b13958b88b2adb1185aa95dee550206e67099d7a97ecceba9623a0a2e1b3d367f4717d2fb9d76acf17cbaf212523bbbabcdcd93d89ab3316
6
+ metadata.gz: 0fba1ca8777e5a2055bd637774e0cb295aca6743beb009efebd2268696ab14270adf7068cceb58e9b2d9a96ae8c9f978549f923cb34c666f9924d010163c986b
7
+ data.tar.gz: 45dbba0a834330f0f22d6c8edf8bea149ff83cf3c5d2462ed5cbfb61ea3d5840d052da0bfd15322ac3718528e718f20f9a17ba01678561a4efa44de664afd5d9
@@ -1,10 +1,13 @@
1
1
  class << Dir
2
- def files glob_para
2
+ def files glob_para, &blk
3
3
  glob( glob_para ).map do |f|
4
4
  full = File.join pwd, f
5
- require 'pry'
6
5
  next if File.directory? full
7
6
  [f, full]
8
- end.compact
7
+ end
8
+ .compact
9
+ .tap do | result |
10
+ result.each(&blk) if blk
11
+ end
9
12
  end
10
13
  end
@@ -0,0 +1,5 @@
1
+ module Kernel
2
+ def sendmsg *args
3
+ ->(*a){ a.first.send(*(args + a.drop( 1 ))) }
4
+ end
5
+ end # module Kernel
@@ -1,5 +1,5 @@
1
1
  module Lab42
2
2
  module Core
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end # module Core
5
5
  end # module Lab42
data/lib/lab42/core.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  require 'lab42/core/dir'
2
2
  require 'lab42/core/enumerable'
3
3
  require 'lab42/core/hash'
4
+ require 'lab42/core/kernel'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lab42_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Dober
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-04 00:00:00.000000000 Z
11
+ date: 2013-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -45,10 +45,11 @@ extensions: []
45
45
  extra_rdoc_files: []
46
46
  files:
47
47
  - lib/lab42/core.rb
48
- - lib/lab42/core/enumerable.rb
48
+ - lib/lab42/core/dir.rb
49
49
  - lib/lab42/core/version.rb
50
50
  - lib/lab42/core/hash.rb
51
- - lib/lab42/core/dir.rb
51
+ - lib/lab42/core/kernel.rb
52
+ - lib/lab42/core/enumerable.rb
52
53
  - LICENSE
53
54
  - README.md
54
55
  homepage: https://github.com/RobertDober/lab42_core
@@ -71,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
72
  version: '0'
72
73
  requirements: []
73
74
  rubyforge_project:
74
- rubygems_version: 2.0.3
75
+ rubygems_version: 2.1.3
75
76
  signing_key:
76
77
  specification_version: 4
77
78
  summary: What I am missing in Ruby