excel_to_code 0.1.17 → 0.1.18

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: f5b18d8eef1b64a6eda84de78561def8ee4daeb2
4
- data.tar.gz: 10e74ec35a2ebfcd45c4ddb78b96fd1a822af3b9
3
+ metadata.gz: 941c09c8afeaa5e544a63fb1085365f8a4f7f992
4
+ data.tar.gz: d5a324022f70c5a83911b77a6ca059be3d738922
5
5
  SHA512:
6
- metadata.gz: 57ffde8911a2371d2f6620dcb9bbcaaad85a6fff062192515cef84b8897cc576b4f058e35de8f5d1531bcaf5a194bd604c0afb1c15498dbd0ad9c7209afbe370
7
- data.tar.gz: cfad0c85ec8eb2338179d425218d4fc4efa9349a7fdde41850a051355662c5c58cdd9cb6662572ee11c3a00dc6b377a6d311ac4bea4781619e5f3e8c44f5efb8
6
+ metadata.gz: a5fd21e7c3779df389c0b876b0369ffdc486118081d1dc875bac7c325f5bab95a66f25989180cdadf67c3c9c5c652f5c3f527a474b6dbfc36b31b520f8a019c0
7
+ data.tar.gz: e45262481894791a2139ddb75cf9c961732401b433360d634063e6aafd87c792cb4fc18f034e8aaa12f0d19f9aae9a0e8630d1e845485fc4545302871d067323
@@ -31,6 +31,7 @@ class MapFormulaeToC < MapValuesToC
31
31
  'AND' => 'excel_and',
32
32
  'AVERAGE' => 'average',
33
33
  'CHOOSE' => 'choose',
34
+ 'CONCATENATE' => 'string_join',
34
35
  'COSH' => 'cosh',
35
36
  'COUNT' => 'count',
36
37
  'COUNTA' => 'counta',
@@ -118,7 +119,7 @@ class MapFormulaeToC < MapValuesToC
118
119
  end
119
120
  end
120
121
 
121
- FUNCTIONS_WITH_ANY_NUMBER_OF_ARGUMENTS = %w{SUM AND AVERAGE COUNT COUNTA MAX MIN SUMPRODUCT}
122
+ FUNCTIONS_WITH_ANY_NUMBER_OF_ARGUMENTS = %w{SUM AND AVERAGE COUNT COUNTA MAX MIN SUMPRODUCT CONCATENATE}
122
123
 
123
124
  def function_pi()
124
125
  "M_PI"
@@ -21,6 +21,7 @@ class MapFormulaeToRuby < MapValuesToRuby
21
21
  'AVERAGE' => 'average',
22
22
  'CELL' => 'cell',
23
23
  'CHOOSE' => 'choose',
24
+ 'CONCATENATE' => 'string_join',
24
25
  'COSH' => 'cosh',
25
26
  'COUNT' => 'count',
26
27
  'COUNTA' => 'counta',
@@ -69,11 +70,11 @@ class MapFormulaeToRuby < MapValuesToRuby
69
70
  def arithmetic(left,operator,right)
70
71
  "#{FUNCTIONS[operator.last]}(#{map(left)},#{map(right)})"
71
72
  end
72
-
73
+
73
74
  def string_join(*strings)
74
75
  "string_join(#{strings.map {|a| map(a)}.join(',')})"
75
76
  end
76
-
77
+
77
78
  def comparison(left,operator,right)
78
79
  "#{FUNCTIONS[operator.last]}(#{map(left)},#{map(right)})"
79
80
  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.17
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Counsell, Green on Black Ltd