cli-mastermind 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cli/mastermind.rb +1 -1
- data/lib/cli/mastermind/configuration.rb +2 -2
- data/lib/cli/mastermind/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 665b35d4768aadf8c4f322eefc4724e8baa5ad62efb24e5abd9992d0c6c7e920
|
4
|
+
data.tar.gz: 28526d6c94c5ff46cda54c04fa44009eaeabaa46b5787a5be327f5d0f60fbecd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22dcafdc16a3c88699b70702319403b3df5b7d9113a993ca9a04bfe354a55094b549fbae02a1b1be22cbc86bc33bf85ef564409405b65231e2cd07cecb008fe1
|
7
|
+
data.tar.gz: f0b19448539416003f3e16fde716bc888ee27c0a70b679c790580e5cae86e6b6a8fcf7280dacf3da35c7c6dec89e5836da96f97a8cd47d2f0e247f2ca746ccb6
|
data/lib/cli/mastermind.rb
CHANGED
@@ -28,11 +28,11 @@ module CLI
|
|
28
28
|
def self.add_attribute(attribute)
|
29
29
|
return if self.method_defined? attribute
|
30
30
|
|
31
|
-
|
31
|
+
define_method "#{attribute}=" do |new_value=nil,&block|
|
32
32
|
self.instance_variable_set("@#{attribute}", new_value||block) if self.instance_variable_get("@#{attribute}").nil?
|
33
33
|
end
|
34
34
|
|
35
|
-
|
35
|
+
define_method attribute do
|
36
36
|
value = self.instance_variable_get("@#{attribute}")
|
37
37
|
return value unless value.respond_to?(:call)
|
38
38
|
|