path-builder 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/path-builder.rb +4 -4
- data/path-builder-0.1.2.gem +0 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e39b4bbce31cebc7e79b4b3d08a4e438a1637ca
|
4
|
+
data.tar.gz: 4ab32bc872aa829af013430cafbc1073d9b95c83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6358d31f62afca9fc957a11ff73bfa1b9d6f44944406e18f3659d4ee97348f30ac628b3347d433b5a04f4e7723500ffc47c6f7797d0981c2d5f2c27c9e3aa055
|
7
|
+
data.tar.gz: cef06db1accb80323cb1f3304d062a2db8d001c7a5a033de0b4a0dfe2a59d1809446e5745468d2ded5c3aac52201103036cf47bca04c213c5d726de88121684b
|
data/lib/path-builder.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
class PathBuilder
|
2
|
-
def initialize(*
|
2
|
+
def initialize(*segments)
|
3
3
|
@path = self.class.base_path.dup
|
4
4
|
@args = self.class.base_args.dup
|
5
|
-
self.call(*
|
5
|
+
self.call(*segments)
|
6
6
|
end
|
7
7
|
|
8
8
|
class <<self
|
9
9
|
def version
|
10
|
-
"0.1.
|
10
|
+
"0.1.3"
|
11
11
|
end
|
12
12
|
def base_path=(path)
|
13
13
|
@base_path = path
|
@@ -46,7 +46,7 @@ class PathBuilder
|
|
46
46
|
|
47
47
|
# Add a segment (symbol: variable, string: static)
|
48
48
|
def call(*segments)
|
49
|
-
@path += segments
|
49
|
+
@path += segments.flat_map{ |s| s.split('/') }
|
50
50
|
self
|
51
51
|
end
|
52
52
|
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: path-builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben
|
@@ -56,6 +56,7 @@ files:
|
|
56
56
|
- lib/path-builder.rb
|
57
57
|
- path-builder-0.1.0.gem
|
58
58
|
- path-builder-0.1.1.gem
|
59
|
+
- path-builder-0.1.2.gem
|
59
60
|
- path-builder.gemspec
|
60
61
|
homepage: https://github.com/penne12/path-builder
|
61
62
|
licenses:
|