Sha256: 639ec27dd458936371db09d7ca2f8a70046d26c1c69720cfc504288be65f65c3

Contents?: true

Size: 406 Bytes

Versions: 4

Compression:

Stored size: 406 Bytes

Contents

# coding: utf-8

module ThinReports
  module Core::Shape::TextBlock
    
    # @private
    class Formatter::Datetime < Formatter::Basic
      
    private
      
      def apply_format_to(value)
        value.strftime(format.format_datetime_format)
      end
      
      def applicable?(value)
        !format.format_datetime_format.blank? && value.respond_to?(:strftime)
      end
    end
    
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
thinreports-0.7.7 lib/thinreports/core/shape/text_block/formatter/datetime.rb
thinreports-0.7.6 lib/thinreports/core/shape/text_block/formatter/datetime.rb
thinreports-0.7.5 lib/thinreports/core/shape/text_block/formatter/datetime.rb
thinreports-0.7.0 lib/thinreports/core/shape/text_block/formatter/datetime.rb