Module: PrayerTimes

Extended by:
Setters
Defined in:
lib/prayer_times.rb,
lib/prayer_times/setters.rb,
lib/prayer_times/version.rb,
lib/prayer_times/constants.rb,
lib/prayer_times/calculator.rb,
lib/prayer_times/calculation.rb,
lib/prayer_times/math_helpers.rb,
lib/prayer_times/calculation_method.rb,
lib/prayer_times/calculation_methods.rb

Overview

PrayerTimes namespace module

Defined Under Namespace

Modules: Constants, MathHelpers, Setters Classes: Calculation, CalculationMethod, CalculationMethods, Calculator

Constant Summary collapse

VERSION =

Determines the version of this gem

'0.1.3'

Class Attribute Summary collapse

Class Method Summary collapse

Methods included from Setters

calculation_method=, const_class, invalid_time=, iterations_count=, time_format=, time_suffixes=, times_names=, times_offsets=

Class Attribute Details

.calculation_methodObject (readonly)

Returns the value of attribute calculation_method.



17
18
19
# File 'lib/prayer_times.rb', line 17

def calculation_method
  @calculation_method
end

.calculation_methodsObject (readonly)

Returns the value of attribute calculation_methods.



17
18
19
# File 'lib/prayer_times.rb', line 17

def calculation_methods
  @calculation_methods
end

.invalid_timeObject (readonly)

Returns the value of attribute invalid_time.



17
18
19
# File 'lib/prayer_times.rb', line 17

def invalid_time
  @invalid_time
end

.iterations_countObject (readonly)

Returns the value of attribute iterations_count.



17
18
19
# File 'lib/prayer_times.rb', line 17

def iterations_count
  @iterations_count
end

.time_formatObject (readonly)

Returns the value of attribute time_format.



17
18
19
# File 'lib/prayer_times.rb', line 17

def time_format
  @time_format
end

.time_suffixesObject (readonly)

Returns the value of attribute time_suffixes.



17
18
19
# File 'lib/prayer_times.rb', line 17

def time_suffixes
  @time_suffixes
end

.times_namesObject (readonly)

Returns the value of attribute times_names.



17
18
19
# File 'lib/prayer_times.rb', line 17

def times_names
  @times_names
end

.times_offsetsObject (readonly)

Returns the value of attribute times_offsets.



17
18
19
# File 'lib/prayer_times.rb', line 17

def times_offsets
  @times_offsets
end

Class Method Details

.const_classObject



26
27
28
# File 'lib/prayer_times.rb', line 26

def const_class
  Constants
end

.new(calc_method = @calucation_method, opts = {}) ⇒ Object

See Also:



22
23
24
# File 'lib/prayer_times.rb', line 22

def new(calc_method = @calucation_method, opts = {})
  PrayerTimes::Calculator.new(calc_method, opts)
end

.set_attributesObject



30
31
32
33
34
35
36
37
38
# File 'lib/prayer_times.rb', line 30

def set_attributes
  attrs =  [:iterations_count, :times_names, :time_format,
            :time_suffixes, :times_offsets, :invalid_time]
  attrs.each { |attr| send "#{attr}=", nil }

  @calculation_methods = CalculationMethods.new

  @calculation_method = @calculation_methods['MWL']
end