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
-
.calculation_method ⇒ Object
readonly
Returns the value of attribute calculation_method.
-
.calculation_methods ⇒ Object
readonly
Returns the value of attribute calculation_methods.
-
.invalid_time ⇒ Object
readonly
Returns the value of attribute invalid_time.
-
.iterations_count ⇒ Object
readonly
Returns the value of attribute iterations_count.
-
.time_format ⇒ Object
readonly
Returns the value of attribute time_format.
-
.time_suffixes ⇒ Object
readonly
Returns the value of attribute time_suffixes.
-
.times_names ⇒ Object
readonly
Returns the value of attribute times_names.
-
.times_offsets ⇒ Object
readonly
Returns the value of attribute times_offsets.
Class Method Summary collapse
- .const_class ⇒ Object
- .new(calc_method = @calucation_method, opts = {}) ⇒ Object
- .set_attributes ⇒ Object
Methods included from Setters
calculation_method=, const_class, invalid_time=, iterations_count=, time_format=, time_suffixes=, times_names=, times_offsets=
Class Attribute Details
.calculation_method ⇒ Object (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_methods ⇒ Object (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_time ⇒ Object (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_count ⇒ Object (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_format ⇒ Object (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_suffixes ⇒ Object (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_names ⇒ Object (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_offsets ⇒ Object (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_class ⇒ Object
26 27 28 |
# File 'lib/prayer_times.rb', line 26 def const_class Constants end |
.new(calc_method = @calucation_method, opts = {}) ⇒ Object
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_attributes ⇒ Object
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 |