Sha256: 8984514e9257b57d297cc265579d2c6e9445f60d5ca9a5ac379c92e940cf46e0

Contents?: true

Size: 261 Bytes

Versions: 12

Compression:

Stored size: 261 Bytes

Contents

# frozen_string_literal: true

module Sail
  module Types
    # Date
    #
    # The Date type parses the saved
    # string into a DateTime object.
    class Date < Type
      def to_value
        DateTime.parse(@setting.value).utc
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
sail-3.6.1 lib/sail/types/date.rb
sail-3.6.0 lib/sail/types/date.rb
sail-3.5.1 lib/sail/types/date.rb
sail-3.5.0 lib/sail/types/date.rb
sail-3.4.0 lib/sail/types/date.rb
sail-3.3.0 lib/sail/types/date.rb
sail-3.2.4 lib/sail/types/date.rb
sail-3.2.3 lib/sail/types/date.rb
sail-3.2.2 lib/sail/types/date.rb
sail-3.2.1 lib/sail/types/date.rb
sail-3.2.0 lib/sail/types/date.rb
sail-3.1.0 lib/sail/types/date.rb