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.0.13 lib/time_service.rb
sports_db-0.1.3 lib/time_service.rb
sports_db-0.1.2 lib/time_service.rb
sports_db-0.1.1 lib/time_service.rb
sports_db-0.1.0 lib/time_service.rb
sports_db-0.0.9 lib/time_service.rb
sports_db-0.0.8 lib/time_service.rb
sports_db-0.0.7 lib/time_service.rb
sports_db-0.0.6 lib/time_service.rb
sports_db-0.0.5 lib/time_service.rb
sports_db-0.0.4 lib/time_service.rb
sports_db-0.0.3 lib/time_service.rb