samovar 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/samovar/command.rb +8 -4
- data/lib/samovar/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 245b83811d09cc997ce160fa8c6a5481e3efe0cc
|
4
|
+
data.tar.gz: b7e021a4cad13a340d6b77dbd2cbe4c066383c5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a7e9e3e968d94c1d88eb308f1bf1e46c3c29ee2e7c1847d3a42b2b5f55f686e7e45a10ba43b75a98ccff09288a99e733bccd030bf58f05a721e8c43084014f1
|
7
|
+
data.tar.gz: b8d72d941e4f5f2659c7e4ea9235a66667ed637945d43ee0772eb3774b929afdfff013719ba677a00ff8f4da92cb07d39c822dae2e50e1c1775a2ec1a5a9ec58
|
data/lib/samovar/command.rb
CHANGED
@@ -47,14 +47,18 @@ module Samovar
|
|
47
47
|
self.parse(input)
|
48
48
|
end
|
49
49
|
|
50
|
-
def
|
50
|
+
def [](*input)
|
51
|
+
self.dup.tap{|command| command.parse(input)}
|
52
|
+
end
|
53
|
+
|
54
|
+
def parse(input)
|
51
55
|
self.class.table.parse(input) do |key, value|
|
52
56
|
self.send("#{key}=", value)
|
53
|
-
end
|
57
|
+
end
|
54
58
|
end
|
55
59
|
|
56
|
-
def
|
57
|
-
|
60
|
+
def initialize(input = nil)
|
61
|
+
parse(input) if input
|
58
62
|
end
|
59
63
|
|
60
64
|
class << self
|
data/lib/samovar/version.rb
CHANGED