Sha256: 1143400ce050bce40f61f3597fe2ef7f73dc7b432d9a8e323a6bec00db8ad9db

Contents?: true

Size: 282 Bytes

Versions: 11

Compression:

Stored size: 282 Bytes

Contents

module Rasti
  class Form
    module Formatable

      include Castable

      private

      def valid?(value)
        (value.is_a?(::String) || value.is_a?(Symbol)) && value.to_s.match(format)
      end

      def transform(value)
        value
      end
      
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rasti-form-3.0.0 lib/rasti/form/formatable.rb
rasti-form-2.2.0 lib/rasti/form/formatable.rb
rasti-form-2.1.0 lib/rasti/form/formatable.rb
rasti-form-2.0.0 lib/rasti/form/formatable.rb
rasti-form-1.1.1 lib/rasti/form/formatable.rb
rasti-form-1.1.0 lib/rasti/form/formatable.rb
rasti-form-1.0.3 lib/rasti/form/formatable.rb
rasti-form-1.0.2 lib/rasti/form/formatable.rb
rasti-form-1.0.1 lib/rasti/form/formatable.rb
rasti-form-1.0.0 lib/rasti/form/formatable.rb
rasti-form-0.1.0 lib/rasti/form/formatable.rb