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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 343975ca25f272846c446b919686023b2bd183e8
4
- data.tar.gz: cf5359e5f8bfdf04fbfcc8c32cc7c01ed960026b
3
+ metadata.gz: 245b83811d09cc997ce160fa8c6a5481e3efe0cc
4
+ data.tar.gz: b7e021a4cad13a340d6b77dbd2cbe4c066383c5d
5
5
  SHA512:
6
- metadata.gz: d4b5a2dc7283dcf158f9e15aa2e9adeaff7e521cf37e16d89c68b307b884663e7d56c9ad001ae6b2e8150323a1c00703196bedeb21fe1c0959d6d4b003fedb47
7
- data.tar.gz: 7a3e4f272e3421b108d26542960dc1a6103e28447b6a10585d2a32627bbf5ed863fed536adabc89b8977412a01a644ccc6ba49b2fbc1fed3aac06403e8ab4912
6
+ metadata.gz: 9a7e9e3e968d94c1d88eb308f1bf1e46c3c29ee2e7c1847d3a42b2b5f55f686e7e45a10ba43b75a98ccff09288a99e733bccd030bf58f05a721e8c43084014f1
7
+ data.tar.gz: b8d72d941e4f5f2659c7e4ea9235a66667ed637945d43ee0772eb3774b929afdfff013719ba677a00ff8f4da92cb07d39c822dae2e50e1c1775a2ec1a5a9ec58
@@ -47,14 +47,18 @@ module Samovar
47
47
  self.parse(input)
48
48
  end
49
49
 
50
- def initialize(input = nil)
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 if input
57
+ end
54
58
  end
55
59
 
56
- def [] key
57
- @attributes[key]
60
+ def initialize(input = nil)
61
+ parse(input) if input
58
62
  end
59
63
 
60
64
  class << self
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Samovar
22
- VERSION = "1.4.0"
22
+ VERSION = "1.5.0"
23
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: samovar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams