relpathname 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/relpathname.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
MTMyZDE4MjUwM2E2OTBlZGRmMWFiMDU3YjJmMWFhY2RiMGY0OGVhNg==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
MTVhYWExMTU0OTBmZThiZWU3ZjY4ZWRiN2I5MjdjYzI4Yjc2YjViMw==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
YmU2MWVkODI5YzlhNTI3NWI4MjY3MWM4OTkwNGZhYmM4ODU2OTFlMmFkNzI2
|
|
10
|
+
YzlhODExNDMxMDUyZTFmYTZjYTY4OGQ1YjhmOWE5MzU1ODE3ZjRmYTg3YWUw
|
|
11
|
+
MjU5OTc4YjQyZWYyZjkwMjRiNmQyNzRlZThkMjU4MDcwZjhhZTg=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
MWRmNzUxZDMyMjBhMWNlNjhiODdjMThmM2Q4NzRkZWZkYWU5Y2ZjMjkwMTdl
|
|
14
|
+
NzExYzNjMzZkOTlmZjMzMTg3MGY1NGZjMTRhYjM1NjgxYmYyZGE3NzNlMDM1
|
|
15
|
+
YmQ0M2E0MGE4MTA3YTAyOGNiNGViNDBlNDE3NmE4MWFiM2E0MzE=
|
data/lib/relpathname.rb
CHANGED
|
@@ -7,10 +7,12 @@ class Pathname
|
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
class RelPathname < Pathname
|
|
10
|
+
@origin_path
|
|
10
11
|
@initial_pwd
|
|
11
12
|
|
|
12
13
|
def initialize p1
|
|
13
14
|
@initial_pwd = Pathname.pwd
|
|
15
|
+
@origin_path = p1
|
|
14
16
|
|
|
15
17
|
super p1
|
|
16
18
|
end
|
|
@@ -23,6 +25,9 @@ class RelPathname < Pathname
|
|
|
23
25
|
(@initial_pwd + super).relative_path_from(Pathname.pwd).to_s
|
|
24
26
|
end
|
|
25
27
|
|
|
28
|
+
def to_origin_s
|
|
29
|
+
@origin_path
|
|
30
|
+
end
|
|
26
31
|
|
|
27
32
|
def to_s
|
|
28
33
|
prefix = to_pn.each_filename.to_a[0] == '..' ? '' : './'
|