Skip to content

Commit

Permalink
Trim out unnecessary attr_accessor
Browse files Browse the repository at this point in the history
  • Loading branch information
wndxlori committed Jan 16, 2017
1 parent d939b9a commit e5af93a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Marslink/app/model/sol_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@
# THE SOFTWARE.
#
class SolFormatter
attr_accessor :landing_date

def initialize(landing_date = Time.now - 31725960)
self.landing_date = landing_date
@landing_date = landing_date
end

def sols(from_date)
martian_day = 1477 * 60 # 24h37m
seconds = from_date.timeIntervalSinceDate(self.landing_date)
seconds = from_date.timeIntervalSinceDate(@landing_date)
(seconds / martian_day).round
end
end

0 comments on commit e5af93a

Please sign in to comment.