Sha256: 9792a72f111cababb2bb80c85895a299e755176a977765ca223911364025b7c8

Contents?: true

Size: 1.15 KB

Versions: 1

Compression:

Stored size: 1.15 KB

Contents

# encoding: UTF-8
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.2 lib/prayer_times.rb