Sha256: 233bed22782148e5f01d3a6cca1caac4f9feaf6e2dad086a1e2af3ccf4b1e8d7

Contents?: true

Size: 1.04 KB

Versions: 18

Compression:

Stored size: 1.04 KB

Contents

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

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

18 entries across 18 versions & 1 rubygems

Version Path
clark_kent-0.8.11 lib/clark_kent.rb
clark_kent-0.8.10 lib/clark_kent.rb
clark_kent-0.8.9 lib/clark_kent.rb
clark_kent-0.8.8 lib/clark_kent.rb
clark_kent-0.8.7 lib/clark_kent.rb
clark_kent-0.8.6 lib/clark_kent.rb
clark_kent-0.8.5 lib/clark_kent.rb
clark_kent-0.8.4 lib/clark_kent.rb
clark_kent-0.8.3 lib/clark_kent.rb
clark_kent-0.8.2 lib/clark_kent.rb
clark_kent-0.8.1 lib/clark_kent.rb
clark_kent-0.7.1 lib/clark_kent.rb
clark_kent-0.7.0 lib/clark_kent.rb
clark_kent-0.6.1 lib/clark_kent.rb
clark_kent-0.6.0 lib/clark_kent.rb
clark_kent-0.5.0 lib/clark_kent.rb
clark_kent-0.4.4 lib/clark_kent.rb
clark_kent-0.4.3 lib/clark_kent.rb