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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 613e85da0491580f620c8c69daf53e24383b885b
4
- data.tar.gz: d7b50a0630d624b80c629b2f745b976c15b8e485
3
+ metadata.gz: 8e39b4bbce31cebc7e79b4b3d08a4e438a1637ca
4
+ data.tar.gz: 4ab32bc872aa829af013430cafbc1073d9b95c83
5
5
  SHA512:
6
- metadata.gz: b854201fa13b353d5ccc6b0d8934fd48c468ebc70a935545f95588804b0e1c9b963913c08d626a09c9b617aa1c5ba2f5ef89bdb31247015af080a5c664a4fadd
7
- data.tar.gz: 5e78759dca4cb736a870ced9d3c6e1bf9d5152d8ad026dc6b660f118d923c9edd2e4a447ac17da71812f20d0bc6d55e318f0641027952716a7a168ca644b204b
6
+ metadata.gz: 6358d31f62afca9fc957a11ff73bfa1b9d6f44944406e18f3659d4ee97348f30ac628b3347d433b5a04f4e7723500ffc47c6f7797d0981c2d5f2c27c9e3aa055
7
+ data.tar.gz: cef06db1accb80323cb1f3304d062a2db8d001c7a5a033de0b4a0dfe2a59d1809446e5745468d2ded5c3aac52201103036cf47bca04c213c5d726de88121684b
@@ -1,13 +1,13 @@
1
1
  class PathBuilder
2
- def initialize(*args)
2
+ def initialize(*segments)
3
3
  @path = self.class.base_path.dup
4
4
  @args = self.class.base_args.dup
5
- self.call(*args)
5
+ self.call(*segments)
6
6
  end
7
7
 
8
8
  class <<self
9
9
  def version
10
- "0.1.2"
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.2
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: