scallop 0.2.0 → 0.3.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
  SHA256:
3
- metadata.gz: 2dac1c9873809c992d116dbf21c3e679f56c7b28abb27d39515d5794b8bf9d49
4
- data.tar.gz: 03e036131a0daf08132f1f510c9b0efde5de15650764db0a417ddc0312b2a6fb
3
+ metadata.gz: adaadba09ddd3d7f42551b9d2124a0e440a36a748bcf51133152dc92270b04c5
4
+ data.tar.gz: 8470f4d3ddd1770f8f2b59dcbe6562040114957903acdbfa5393a4abd8c9c54b
5
5
  SHA512:
6
- metadata.gz: af746113586125b22ee0b7940832cac5fcecde9c725575cedb93576b69a45672ca35335549131077419612e161852bc46684bf4603d4431c3ae361f0175ee5bc
7
- data.tar.gz: 0df20b2e7544e886aa53569ecb8f85982ed9320d67220717b7feaef4abe110a8059b827e669bc9b609d7c0dd470406a2f62c16ba1a85d577fb20902733026c49
6
+ metadata.gz: fb1b91457da1830a8e85e878376b00f78bd457518e05a2cdeeff76f6e8fe150a8d3a0147560a8c6f5dc47de5111791c1925b3f58b255197fc0d23524ce7a46ed
7
+ data.tar.gz: 61ba0883e457b12470ea872bd3d6aec83576816cb720877b5a36a7d7ec6e93a2f85af519422d4fa02f6d5057b60733acc13968738ad0f3d2ecc488ae59cf6f93
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- scallop (0.1.0)
4
+ scallop (0.3.0)
5
5
  hashie (~> 3.0)
6
6
 
7
7
  GEM
@@ -1,3 +1,3 @@
1
1
  class Scallop
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
data/lib/scallop.rb CHANGED
@@ -61,18 +61,29 @@ class Scallop
61
61
  end
62
62
 
63
63
  def sudo(sudo = true)
64
- @sudo = sudo
65
- self
64
+ dup
65
+ .tap do |instance|
66
+ instance.instance_eval { @sudo = sudo }
67
+ end
68
+ .freeze
66
69
  end
67
70
 
68
71
  def cmd(*cmd)
69
- @cmd = cmd
70
- self
72
+ dup
73
+ .tap do |instance|
74
+ instance.instance_eval { @cmd = cmd }
75
+ end
76
+ .freeze
71
77
  end
72
78
 
73
79
  def set(params)
74
- @params.merge!(params)
75
- self
80
+ new_params = @params.merge(params)
81
+
82
+ dup
83
+ .tap do |instance|
84
+ instance.instance_eval { @params = new_params }
85
+ end
86
+ .freeze
76
87
  end
77
88
 
78
89
  def to_command
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scallop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - FetLife