lib/prayer_times/constants.rb in prayer_times-0.1.2 vs lib/prayer_times/constants.rb in prayer_times-0.1.3
- old
+ new
@@ -30,19 +30,19 @@
# '12hNS': 12-hour format with no suffix,
# 'Float': floating point number
@time_format = '24h'
# Determines the accepted time format values
- @accepted_time_formats = ['12h','24h','12hNS','Float']
+ @accepted_time_formats = %w(12h 24h 12hNS Float)
# Times suffixes names to be displayed
- @time_suffixes= {:am => 'AM', :pm => 'PM'}
+ @time_suffixes = { am: 'AM', pm: 'PM' }
# What to display when the time is invalid
- @invalid_time= '-----'
+ @invalid_time = '-----'
# Time offsets
- @times_offsets = @times_names.keys.inject({}){ |h,k| h.merge!(k => 0)}
+ @times_offsets = @times_names.keys.reduce({}) { |a, e| a.merge!(e => 0) }
class << self
attr_reader :iterations_count, :times_names,
:time_format, :time_suffixes,:times_offsets,:invalid_time,
:accepted_iterations_count_range, :accepted_time_formats