belts_support 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 776ea8d91c3be605b808b4c294104d1f6071631f52f4762ac335ebc2194edfca
4
+ data.tar.gz: 4ef61cd11805b496c374e4014ad1d770aae16f0c39754544183fd7500533bb2c
5
+ SHA512:
6
+ metadata.gz: 88a6826a6e04726a62929de2d6a7933a063d7efa482a3aebd64887a13cb0b050298ca52fcd492900dda9740e3a9a99e629862bf59a90653bae99a77ebd507f9f
7
+ data.tar.gz: 4e5cac911757be92da3bf8087f9360ab0e041e3a0427ab26d501426d9843b59a8a1e49d83134796e7bca3925edb4a5304b28fbc34d79a8b488c7b342177321be
@@ -0,0 +1,44 @@
1
+ module BeltsSupport
2
+ module Configuration
3
+ class << self
4
+ def included(base)
5
+ base.extend ClassMethods
6
+ base.include InstanceMethods
7
+ end
8
+ end
9
+
10
+ module ClassMethods
11
+ def config
12
+ @config ||= ConfigurationObject.new
13
+ end
14
+ end
15
+
16
+ module InstanceMethods
17
+ def config
18
+ self.class.config
19
+ end
20
+ end
21
+
22
+ class ConfigurationObject
23
+ def initialize
24
+ @@options ||= {}
25
+ end
26
+
27
+ def respond_to?(name, include_private = false)
28
+ super || @@options.key?(name.to_sym)
29
+ end
30
+
31
+ private
32
+
33
+ def method_missing(name, *args, &blk)
34
+ if name.end_with?("=")
35
+ @@options[:"#{name[0..-2]}"] = args.first
36
+ elsif @@options.key?(name)
37
+ @@options[name]
38
+ else
39
+ super
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,7 @@
1
+ module BeltsSupport
2
+ module Extension
3
+ def install(game)
4
+ raise NotImplementedError
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,10 @@
1
+ require 'active_support/inflector'
2
+ require 'active_support/core_ext/module/delegation'
3
+ require 'matrix'
4
+ require "zeitwerk"
5
+
6
+ loader = Zeitwerk::Loader.for_gem
7
+ loader.setup
8
+
9
+ module BeltsSupport
10
+ end
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: belts_support
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Guilherme Graca
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-06-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 7.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 7.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: matrix
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.4.2
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.4.2
41
+ - !ruby/object:Gem::Dependency
42
+ name: zeitwerk
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 2.4.2
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 2.4.2
55
+ description:
56
+ email:
57
+ executables: []
58
+ extensions: []
59
+ extra_rdoc_files: []
60
+ files:
61
+ - lib/belts_support.rb
62
+ - lib/belts_support/configuration.rb
63
+ - lib/belts_support/extension.rb
64
+ homepage: https://github.com/ggraca/belts
65
+ licenses:
66
+ - MIT
67
+ metadata: {}
68
+ post_install_message:
69
+ rdoc_options: []
70
+ require_paths:
71
+ - lib
72
+ required_ruby_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: 3.1.2
77
+ required_rubygems_version: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ requirements: []
83
+ rubygems_version: 3.3.7
84
+ signing_key:
85
+ specification_version: 4
86
+ summary: Common tools for the Belts game engine
87
+ test_files: []