Sha256: fc5261af1ca562e305d5d5635c8ce93400e65b070afc943f8c7fe741669b6c70

Contents?: true

Size: 467 Bytes

Versions: 19

Compression:

Stored size: 467 Bytes

Contents

require 'fiona7/attribute_readers/attribute_reader'

module Fiona7
  module AttributeReaders
    class DateAsDate < AttributeReader
      def call
        # NOTE: this is a bug in fiona connector 
        # [valid_(from|until)] returns a raw string
        if ["valid_from", "valid_until"].include?(self.attr_name.to_s)
          self.obj[self.attr_name]
        else
          self.obj[self.attr_name].try(:utc).try(:to_iso)
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
infopark_fiona7-1.6.1.1.5 lib/fiona7/attribute_readers/date_as_date.rb
infopark_fiona7-1.6.1.1.1 lib/fiona7/attribute_readers/date_as_date.rb
infopark_fiona7-1.6.1.1.0 lib/fiona7/attribute_readers/date_as_date.rb
infopark_fiona7-1.2.0.2.3 lib/fiona7/attribute_readers/date_as_date.rb
infopark_fiona7-1.2.0.2.1 lib/fiona7/attribute_readers/date_as_date.rb
infopark_fiona7-1.2.0.2.2 lib/fiona7/attribute_readers/date_as_date.rb
infopark_fiona7-1.5.5.5.1 lib/fiona7/attribute_readers/date_as_date.rb
infopark_fiona7-1.5.5.5.0 lib/fiona7/attribute_readers/date_as_date.rb
infopark_fiona7-1.2.0.1.4 lib/fiona7/attribute_readers/date_as_date.rb
infopark_fiona7-1.5.5.4.1 lib/fiona7/attribute_readers/date_as_date.rb
infopark_fiona7-1.5.5.4.0 lib/fiona7/attribute_readers/date_as_date.rb
infopark_fiona7-1.2.0.1.3 lib/fiona7/attribute_readers/date_as_date.rb
infopark_fiona7-1.5.5.3.1 lib/fiona7/attribute_readers/date_as_date.rb
infopark_fiona7-1.5.4.3.0 lib/fiona7/attribute_readers/date_as_date.rb
infopark_fiona7-1.5.3.2.0 lib/fiona7/attribute_readers/date_as_date.rb
infopark_fiona7-1.5.3.2.0.pre.beta1 lib/fiona7/attribute_readers/date_as_date.rb
infopark_fiona7-1.5.2.1.0.pre.beta1 lib/fiona7/attribute_readers/date_as_date.rb
infopark_fiona7-1.5.2.0.0 lib/fiona7/attribute_readers/date_as_date.rb
infopark_fiona7-1.2.0.1.1 lib/fiona7/attribute_readers/date_as_date.rb