teepee 0.14.0 → 0.14.1

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: 1ad7e873be682b29bf46708116025d300e1bed12
4
- data.tar.gz: d699edba2d17a0ef8bc4e34cb7f3e216ffd995ff
3
+ metadata.gz: 90aab67a11f17f6ead3c9180b307e3a918737139
4
+ data.tar.gz: 1727d86d63a5acf338fc96b9dbad8cb8b51adbe8
5
5
  SHA512:
6
- metadata.gz: e731b8981c1955eb899030e90c661d7215794e329b9aff21be068c9bf9d38add3279567925e03770d252312f7e7e9fcc8d265865ce9fe0c55b8a8a31cce5747d
7
- data.tar.gz: aa4ea47a6d83c2901a2dc9ab79fb206cc56b863ccee39004f747f3c0f26aa13decc0a410f6d220de6356a55c43bee9de05dc0dd91c65809bc9fe5ccec1df5199
6
+ metadata.gz: 45a18e5c9f2514bb3e9491c08ebfbf322a6d5a68ec64f8c3427aa5e18671c5fad9467cd2964901754ed55d91fb30bb047db1e63050ab0fd8d95719a9fdc4c782
7
+ data.tar.gz: b7dae579ecd6ebbb17e71ca27f94a74610ca5d62787d502a5f908cf004e96f6e01d4698ae26a16f47f21673073f734a237571fd481bf0006f12423ff026497f1
@@ -457,7 +457,7 @@ module Teepee
457
457
  end
458
458
 
459
459
  def get_operator variable
460
- @variables[variable.to_s]
460
+ @variables[variable.to_s].to_html
461
461
  end
462
462
 
463
463
  def greater_than numbers
@@ -716,6 +716,7 @@ module Teepee
716
716
  def set_operator expressions
717
717
  variable, _, value = expressions
718
718
  @variables[variable.to_s] = value
719
+ value.to_html
719
720
  end
720
721
 
721
722
  def sin angle
data/lib/teepee.rb CHANGED
@@ -55,6 +55,16 @@ class Integer
55
55
  end
56
56
  end
57
57
 
58
+ class String
59
+ def to_number
60
+ begin
61
+ Float(self)
62
+ rescue ArgumentError
63
+ ""
64
+ end
65
+ end
66
+ end
67
+
58
68
  require 'teepee/constants'
59
69
  require 'teepee/errors'
60
70
  require 'teepee/parser-node'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teepee
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Mark Gore