wry_inject 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/wry_inject.rb +17 -0
  3. metadata +44 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: f9da1aa0c2f8bfd8581098267b7d1b41abfa43dd527f74a257b1d737a12675da
4
+ data.tar.gz: 8fdb31ff71901ba7484b28fa3f2b5321d2c3a11fe6c2ee92812cf29b97b52f54
5
+ SHA512:
6
+ metadata.gz: ea2e4d6078429084486c944f8c5b47e3a31937508ae064dbc9aa2e96ddd766c56e0e39a0ef6497302262f4349a64227136d9a4d7ee42d309e38bf53bb85afbcd
7
+ data.tar.gz: 440667b510822f7dcb360a083296d89deb2dc28dc07299b361c71e34b48c246e682e464df21d0b98f62008650c9fdbf19c6c770cb750a8d49c17051cffd34bf3
data/lib/wry_inject.rb ADDED
@@ -0,0 +1,17 @@
1
+ module WryInject
2
+ def self.included(base)
3
+ base.extend ClassMethods
4
+ end
5
+
6
+ module ClassMethods
7
+ def class_with(**args)
8
+ Class.new(self) do
9
+ args.each do |k, v|
10
+ define_method k do
11
+ v
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: wry_inject
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - David Carlin
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-08-10 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Dependency Injection that allows you to generate pre-configured classes
14
+ email: davich@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/wry_inject.rb
20
+ homepage: https://github.com/davich/wry_inject
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.7.3
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: A better Dependency Injection option for Ruby
44
+ test_files: []