Sha256: 83207728b4fdcc7f6242d7ee891bd2e3060cc0868b1c362b4f7686593e0f265d

Contents?: true

Size: 340 Bytes

Versions: 32

Compression:

Stored size: 340 Bytes

Contents

class TimeService
    def self.now
        config = SimpleConfig.for(:application)
        config.timeservice.call()
    rescue
        Rails.logger.error("Could not call time service: SimpleConfig is not initialized, there's no application scope, no timeservice property, or it's not a lambda.")
        return DateTime.now.utc
    end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
sports_db-0.2.19 lib/time_service.rb
sports_db-0.2.18 lib/time_service.rb
sports_db-0.2.17 lib/time_service.rb
sports_db-0.2.16 lib/time_service.rb
sports_db-0.2.15 lib/time_service.rb
sports_db-0.2.14 lib/time_service.rb
sports_db-0.2.13 lib/time_service.rb
sports_db-0.2.12 lib/time_service.rb
sports_db-0.2.11 lib/time_service.rb
sports_db-0.2.10 lib/time_service.rb
sports_db-0.2.9 lib/time_service.rb
sports_db-0.2.8 lib/time_service.rb
sports_db-0.2.7 lib/time_service.rb
sports_db-0.2.6 lib/time_service.rb
sports_db-0.2.5 lib/time_service.rb
sports_db-0.2.4 lib/time_service.rb
sports_db-0.2.3 lib/time_service.rb
sports_db-0.2.2 lib/time_service.rb
sports_db-0.2.1 lib/time_service.rb
sports_db-0.2 lib/time_service.rb