hiiro 0.1.247 → 0.1.248

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c2d2a1e2e4ffabb320cf96596b5f4e09d248693266ea17625b72e43ce2d31b22
4
- data.tar.gz: 47525e1929904632aba3f28f10c4ae0959d7a69acfffc31c83f60e162179e813
3
+ metadata.gz: a1d9359776e9e191a52cf66894d68c9479b65ac7ee158d8431827cbb798491c2
4
+ data.tar.gz: aac408e2d02c99e647f83f874f544bdb0faa4cb03f98fa84079c74cb6345ba69
5
5
  SHA512:
6
- metadata.gz: '0936325092f5106b15ba7b95c81f80ae63d5317d009dc3462e57e5beeaba7727e8f23961f19e2b666b68753adeca8a108c14cc8a17ce4fd92b80c59f4bb2ecc7'
7
- data.tar.gz: 76063e8050533a38e6eed7fd03c097d205f80b796fe7a38e2810040c6f70bbd6acc1887f05f0750630f0817b68ac517cb5806cf4b32beae5a107abeb328d82ca
6
+ metadata.gz: f25d0b437741af5e30d8bc9fb5a366a99f569695d9d251638d17413b08e4be989d159532135b87817b4e490fc9d28add036ac029b88e7cd8b70feeacc562c25c
7
+ data.tar.gz: cb7ce0fe3ebccd1fb8f78ac077f17411e6045f8b64ead13b99efa775dc5577b62cf87b11d24bdcc85cc483bff3385db062b4f0dbe991eb194e66f6e83667f366
@@ -0,0 +1,29 @@
1
+ class Hiiro
2
+ module AnyStruct
3
+ attr_reader :_args, :_raw_data
4
+
5
+ def initialize(*args, **raw_data)
6
+ @_args = args
7
+ @_raw_data = raw_data
8
+
9
+ hashes = args.select{|arg| arg.is_a?(Hash) }.each
10
+ init_data(*hashes, raw_data)
11
+ end
12
+
13
+ private def init_data(*hashes)
14
+ hashes.each do |h|
15
+ h.each do |key, value|
16
+ instance_variable_set(:"@#{key}", value)
17
+
18
+ define_singleton_method(key) do
19
+ instance_variable_get(:"@#{key}")
20
+ end
21
+
22
+ define_singleton_method(:"#{key}=") do |val|
23
+ instance_variable_set(:"@#{key}", val)
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
data/lib/hiiro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.247"
2
+ VERSION = "0.1.248"
3
3
  end
data/lib/hiiro.rb CHANGED
@@ -23,6 +23,7 @@ require_relative "hiiro/service_manager"
23
23
  require_relative "hiiro/runner_tool"
24
24
  require_relative "hiiro/app_files"
25
25
  require_relative "hiiro/rbenv"
26
+ require_relative "hiiro/any_struct"
26
27
 
27
28
  class String
28
29
  def underscore(camel_cased_word=self)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiiro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.247
4
+ version: 0.1.248
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota
@@ -138,6 +138,7 @@ files:
138
138
  - h-tmux-plugins.tmux
139
139
  - hiiro.gemspec
140
140
  - lib/hiiro.rb
141
+ - lib/hiiro/any_struct.rb
141
142
  - lib/hiiro/app_files.rb
142
143
  - lib/hiiro/bins.rb
143
144
  - lib/hiiro/config.rb