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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 741a7a700d2d37228f6002dcc7776f00d3c975ec
4
- data.tar.gz: 049469dbe509df37e8c21c3702248ab5eabb467e
3
+ metadata.gz: 756a9d8d271760c9ae1255f24ca3f4fe8a2a1629
4
+ data.tar.gz: 5ebf73fd12289d2092630753093eb5ef2b841bea
5
5
  SHA512:
6
- metadata.gz: e80a33c66d5f932b502b5ba69fb5a03ed764295a5798a98279acb9c001f66e53cd4b821568fe4dab69c442a3ae6986cad845a6b04841bd2844204da260403677
7
- data.tar.gz: 4096057d99938214307c0b2a7f217b3a632cd84011dfec1065bdc62a3380568445116b4eebe2e5fcbeba15403e9cd2f95282d633f01f752235df9bdcfbd7b75e
6
+ metadata.gz: 5b323e60aca00a19f961e19a5e1888812eef5eddba3cb45b912237f3c9eb41d9f3078ebccf4a47cf55c00a150b42a009b559f667c5aab0520ba34da611f97f39
7
+ data.tar.gz: a0e8b748ef3acfef9dcc7837fad747625e1ffa446002ee625e9cb167a63587ee624040fd2726f0f07d2d2551a81fccda7c3fbc1bbfc184b94973681bd34779c3
@@ -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}:#{last[0]}#{first[1]}", # "B2:D2"
47
- right: "#{last[0]}#{first[1]}:#{last}", # "D2:D5"
48
- bottom: "#{first[0]}#{last[1]}:#{last}", # "B5:D5"
49
- left: "#{first}:#{first[0]}#{last[1]}" # "B2:B5"
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
 
@@ -1,3 +1,3 @@
1
1
  module AxlsxStyler
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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.2
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-20 00:00:00.000000000 Z
11
+ date: 2015-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: axlsx