excel_to_code 0.1.22 → 0.1.23
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 +4 -4
- data/src/compile/ruby/map_formulae_to_ruby.rb +1 -0
- data/src/excel/excel_functions.rb +1 -0
- data/src/excel/excel_functions/right.rb +13 -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: 80514163db20835472c1af4fcd9d58c5705037cf
|
4
|
+
data.tar.gz: 50da754f9c831eb99917d0f460a6876db0c9c3b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4c99e4ffbf3319fe1a95390ebd0ce149d543cd60a2c207955a925083bb9e68ae518a84d2bcbea429b67d7f63a87923dc18dde956bda74cda3503c1750987148
|
7
|
+
data.tar.gz: 1c2929b8d1474a63e085013545fd6a0250bc5863b1294bed9c61c8fa9a984176d92e298fdddf722b8e79c67423c3040ec8ef9e64c6e011277bba2aa251d89153
|
@@ -60,6 +60,7 @@ require_relative 'excel_functions/cosh'
|
|
60
60
|
require_relative 'excel_functions/string_join'
|
61
61
|
require_relative 'excel_functions/find'
|
62
62
|
require_relative 'excel_functions/left'
|
63
|
+
require_relative 'excel_functions/right'
|
63
64
|
|
64
65
|
# Rounding functions
|
65
66
|
require_relative 'excel_functions/round'
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module ExcelFunctions
|
2
|
+
|
3
|
+
def right(string,characters = 1)
|
4
|
+
return string if string.is_a?(Symbol)
|
5
|
+
return characters if characters.is_a?(Symbol)
|
6
|
+
return nil if string == nil || characters == nil
|
7
|
+
string = "TRUE" if string == true
|
8
|
+
string = "FALSE" if string == false
|
9
|
+
string = string.to_s
|
10
|
+
string.slice(string.length-characters,characters)
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: excel_to_code
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Counsell, Green on Black Ltd
|
@@ -160,6 +160,7 @@ files:
|
|
160
160
|
- src/excel/excel_functions/power.rb
|
161
161
|
- src/excel/excel_functions/pv.rb
|
162
162
|
- src/excel/excel_functions/rank.rb
|
163
|
+
- src/excel/excel_functions/right.rb
|
163
164
|
- src/excel/excel_functions/round.rb
|
164
165
|
- src/excel/excel_functions/rounddown.rb
|
165
166
|
- src/excel/excel_functions/roundup.rb
|