astro_calc 0.2.0 → 0.2.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: 31511e036e6ad014aa8f9ee6445239d877807a5c
4
- data.tar.gz: 8bbd419eb39144b1e0fda6523a0efbe2504a35ac
3
+ metadata.gz: 9c86722be97ceeca6bc85b08889afab760dadbd0
4
+ data.tar.gz: 9787dc9743fc1ac572bcd3bdb73c2151c71b18be
5
5
  SHA512:
6
- metadata.gz: 4a351113e25f3e34722367b275822bf47f75ad6fad50ab64531268bbd1bceb6f7b76a12951990a8fbe7a0bb1a012bf1383327b009f314a2f281fce67ca69219e
7
- data.tar.gz: 3fa4329ae7633ec5806dd5fa714b689670cf39644138d19f29830024116ff590d4490c42febafb957e78dcc1276382bb3c90be5fd707f10abece87f7bc2edd09
6
+ metadata.gz: 8dfba826231be4d85d32b0cb760aa46655577fb968d794b882801f7f5c8e6eac4ece1e0d31092af8d59bb5f57a64c9a35d6721e117cd9db0cf4e08453f17c202
7
+ data.tar.gz: 949d082c220b0b282f0ad4e5863db8e59ee555043055df7a45ad016e5578de442fd89699d8a593ba07f11846676b48d48e5c845c8c27d3dc7c24f6e5b2b33794
@@ -2,7 +2,7 @@ require "date"
2
2
 
3
3
  #Credits
4
4
  #{https://github.com/tingletech/moon-phase tingletech}
5
- class MoonPhase
5
+ class MoonPhases
6
6
  YEAR_IN_DAYS = 365.25
7
7
  LIMIT_JULIAN_CALENDAR = 2299160
8
8
  JULIAN_DAYS_IN_MONTH = 29.530588853
@@ -28,8 +28,12 @@ class Telescopes
28
28
  # @param diameter [Integer] the diameter of the telescope tube
29
29
  # @return [Float] the maximum magnification usable with the given diameter
30
30
  def maximum_magnification(diameter)
31
- maximum = diameter * 2
32
- maximum /= MM_IN_INCH if options[:unit] == UNIT_INCHES
31
+ case @unit
32
+ when UNIT_MILLIMETERS
33
+ maximum = diameter * 2
34
+ when UNIT_INCHES
35
+ maximum = diameter * 2 / MM_IN_INCH
36
+ end
33
37
  end
34
38
 
35
39
  # Calculates the focal ration of a telescope
@@ -1,3 +1,3 @@
1
1
  module AstroCalc
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: astro_calc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reuben Mallaby
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-04 00:00:00.000000000 Z
11
+ date: 2016-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler