method_template 1.0.0

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/method_template.rb +13 -0
  3. metadata +44 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3a98874cbf7b509461cb76d06f818b1c6d6a45a5e62bb2f3ed50e1a3d8c4b3a1
4
+ data.tar.gz: d4d7bd5bc6d4f349d54267c9062486b3baf1f549442c77fca04f6d160a03c567
5
+ SHA512:
6
+ metadata.gz: 962166c20011f73e8c243df1ad4ce82a0cb0672f0afa2562fe967e07dfe6b4b2fee40d5334e82b67d4aa508e2122cdaa5d1946efaf4d4f43b34cdeba186a4ba1
7
+ data.tar.gz: 8946f6cb2b84f185c84617342b8062c0d275b5950efd943ea7722fd7bd8995d4940475a9113301c2c28d23e9f53334aa5a9bfff2b72776af60c125c140967e50
@@ -0,0 +1,13 @@
1
+ module MethodTemplate
2
+
3
+ def hook_methods(*args)
4
+ args.each do |arg|
5
+ define_method(arg) do
6
+ raise NotImplementedError, ":#{arg} is a required method of #{self.class}!"
7
+ end
8
+ end
9
+ end
10
+
11
+ alias_method :hook_method, :hook_methods
12
+ end
13
+
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: method_template
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Gregory Kenenitz
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-09-24 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Ruby macro for defining hook methods to be overriden
14
+ email:
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/method_template.rb
20
+ homepage: https://github.com/aceofbassgreg/method_template
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: 2.5.1
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.6
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Ruby macro for defining hook methods to be overriden
44
+ test_files: []