svg_data_plotter_gem 0.0.2 → 0.0.3

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/svg_data_plotter_gem.rb +5 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d7bc6f56cb55143fc9cb7be9d44c3992b95a31fe
4
- data.tar.gz: 72fd58b0b9a9ca38fe60b1b5a5d5a5ffe503ad3c
3
+ metadata.gz: eb9dfefae67468255049981a7772b04c861cb115
4
+ data.tar.gz: 972ed1e2d9bee7efbee708636e049324ac7c43dc
5
5
  SHA512:
6
- metadata.gz: 28e2481b8be54e34ebacccecb3782141c43f84aac0578b53187eb018f42f1e11f750f19a0f525b6ce0c2e848ca829550a335c40fc419770d580e86a8d2f8d98d
7
- data.tar.gz: 72b41a56e2deb403ae586f991db032d16bd56d3d517b317d8adbd4d1b7816f5687c64e69b0c0e75026d8ca36a2cb298a564cf1d738b54cb07008e3ef5323d7b5
6
+ metadata.gz: 445e38389021aeaed72f9181e676dcd9c2444d282c2401b448d5c787f4e2e3f7f4394103e79634d7fa0b9e6357defc1154fe355e07e82e54e3aca32698ed8b9e
7
+ data.tar.gz: 491ff7279224a900b0d35bfcda85ab0f5d2d53d26d22c33bdbf8a9bec88488f7421c9d13d23ab953cf2cafdeedc385262d40980bf821bec7922af762a7632b91
@@ -1,5 +1,7 @@
1
1
  module SvgDataPlotterGem
2
2
  class Circle
3
+ attr_reader :score, :total, :size
4
+
3
5
  def initialize(options)
4
6
  validation options, [:score, :total, :size]
5
7
 
@@ -9,11 +11,11 @@ module SvgDataPlotterGem
9
11
  end
10
12
 
11
13
  def percentage
12
- (@score / @total.to_f) * 100
14
+ (score / total.to_f) * 100
13
15
  end
14
16
 
15
17
  def center
16
- @size / 2.0
18
+ size / 2.0
17
19
  end
18
20
 
19
21
  def radius
@@ -25,7 +27,7 @@ module SvgDataPlotterGem
25
27
  end
26
28
 
27
29
  def percentage_adj
28
- (@score / @total.to_f) * circumference
30
+ (score / total.to_f) * circumference
29
31
  end
30
32
 
31
33
  def radians(degrees)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svg_data_plotter_gem
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
  - Rhiana Heath