Sha256: fc2a0c24044a9d1312eaaa149c4d19c4165981ceb4900fefe0a5ea9786340a25

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

require 'date'
require 'forwardable'
require_relative "prayer_times/version"
require_relative "prayer_times/constants"
require_relative "prayer_times/math_helpers"
require_relative "prayer_times/calculation_method"
require_relative "prayer_times/calculation_methods"
require_relative "prayer_times/setters"
require_relative "prayer_times/calculator"
require_relative "prayer_times/calculation"

module PrayerTimes #:nodoc:
  class << self
    include Setters

    attr_reader :iterations_count, :times_names, :calculation_methods,
     :calculation_method,:time_format, :time_suffixes,:times_offsets,
     :invalid_time
    # @see Calculator initializer
    def new(calc_method=@calucation_method,opts={})
      PrayerTimes::Calculator.new(calc_method, opts)
    end

    def const_class
      Constants
    end

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

      @calculation_methods = CalculationMethods.new

      @calculation_method = @calculation_methods['MWL']
    end
  end

  set_attributes

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
prayer_times-0.1.0 lib/prayer_times.rb