Sha256: bb8ee99fc2275fe5dfb272cbade060a84ecfa1d6dc2243d6224b8e81e14941c0

Contents?: true

Size: 1.04 KB

Versions: 23

Compression:

Stored size: 1.04 KB

Contents

require "clark_kent/engine"
require 'simple_form'
require 'thin_man'
require 'aws-sdk'

module ClarkKent
  mattr_accessor  :resource_options, :user_class_name, :other_sharing_scopes, :base_controller,
                  :custom_report_links

  def self.config(options)
    @@resource_options = options[:resource_options].map{|option_hash| ClarkKent::ResourceOption.new option_hash}
    @@user_class_name = options[:user_class_name]
    @@other_sharing_scopes = options[:other_sharing_scopes]
    base_controller_name = options[:base_controller_name]
    @@base_controller = base_controller_name.constantize
    @@custom_report_links = options[:custom_report_links] || []
  end

  def self.user_class
    @@user_class = @@user_class_name.constantize
  end

end

class Date
  def find_day(day_name)
    if Date::DAYNAMES.include?(day_name.capitalize)
      week_start = self if [0,7].include? self.wday
      week_start ||= (self.beginning_of_week - 1.day)
      week_start + Date::DAYNAMES.index(day_name.capitalize)
    else
      self.send(day_name)
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
clark_kent-0.4.2 lib/clark_kent.rb
clark_kent-0.4.1 lib/clark_kent.rb
clark_kent-0.4.0 lib/clark_kent.rb
clark_kent-0.3.2 lib/clark_kent.rb
clark_kent-0.3.1 lib/clark_kent.rb
clark_kent-0.3.0 lib/clark_kent.rb
clark_kent-0.2.10 lib/clark_kent.rb
clark_kent-0.2.8 lib/clark_kent.rb
clark_kent-0.2.7 lib/clark_kent.rb
clark_kent-0.2.6 lib/clark_kent.rb
clark_kent-0.2.5 lib/clark_kent.rb
clark_kent-0.2.4 lib/clark_kent.rb
clark_kent-0.2.3 lib/clark_kent.rb
clark_kent-0.2.2 lib/clark_kent.rb
clark_kent-0.2.1 lib/clark_kent.rb
clark_kent-0.2.0 lib/clark_kent.rb
clark_kent-0.1.7 lib/clark_kent.rb
clark_kent-0.1.6 lib/clark_kent.rb
clark_kent-0.1.5 lib/clark_kent.rb
clark_kent-0.1.4 lib/clark_kent.rb