axlsx_styler 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/axlsx_styler/array.rb +10 -4
- data/lib/axlsx_styler/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 756a9d8d271760c9ae1255f24ca3f4fe8a2a1629
|
4
|
+
data.tar.gz: 5ebf73fd12289d2092630753093eb5ef2b841bea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b323e60aca00a19f961e19a5e1888812eef5eddba3cb45b912237f3c9eb41d9f3078ebccf4a47cf55c00a150b42a009b559f667c5aab0520ba34da611f97f39
|
7
|
+
data.tar.gz: a0e8b748ef3acfef9dcc7837fad747625e1ffa446002ee625e9cb167a63587ee624040fd2726f0f07d2d2551a81fccda7c3fbc1bbfc184b94973681bd34779c3
|
data/lib/axlsx_styler/array.rb
CHANGED
@@ -41,12 +41,18 @@ module AxlsxStyler
|
|
41
41
|
def get_border_cells
|
42
42
|
first = self.first.r
|
43
43
|
last = self.last.r
|
44
|
+
|
45
|
+
first_row = first.scan(/\d+/).first
|
46
|
+
last_row = last.scan(/\d+/).first
|
47
|
+
first_col = first.scan(/\D+/).first
|
48
|
+
last_col = last.scan(/\D+/).first
|
49
|
+
|
44
50
|
# example range "B2:D5"
|
45
51
|
{
|
46
|
-
top: "#{first}:#{
|
47
|
-
right: "#{
|
48
|
-
bottom: "#{
|
49
|
-
left: "#{first}:#{
|
52
|
+
top: "#{first}:#{last_col}#{first_row}", # "B2:D2"
|
53
|
+
right: "#{last_col}#{first_row}:#{last}", # "D2:D5"
|
54
|
+
bottom: "#{first_col}#{last_row}:#{last}", # "B5:D5"
|
55
|
+
left: "#{first}:#{first_col}#{last_row}" # "B2:B5"
|
50
56
|
}
|
51
57
|
end
|
52
58
|
|
data/lib/axlsx_styler/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: axlsx_styler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Sakovich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: axlsx
|