Sha256: 4fd683a1928f11adbe5b2f60dbb1adc341b1614dfef4cb5d3d872fb4d7c1032b

Contents?: true

Size: 296 Bytes

Versions: 5

Compression:

Stored size: 296 Bytes

Contents

module Compel
  module Builder

    class Time < Schema

      def initialize
        super(Coercion::Time)
      end

      def format(value)
        options[:format] = value
        self
      end

      def iso8601
        options[:format] = '%FT%T'
        self
      end

    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
compel-0.3.6 lib/compel/builder/time.rb
compel-0.3.4 lib/compel/builder/time.rb
compel-0.3.2 lib/compel/builder/time.rb
compel-0.3.1 lib/compel/builder/time.rb
compel-0.2.0 lib/compel/builder/time.rb