Sha256: 3df320fe0b2978ae2a1aaf98172678a4ce3de970f1ca5160ce6b8902e6ab8372

Contents?: true

Size: 448 Bytes

Versions: 15

Compression:

Stored size: 448 Bytes

Contents

require 'pathname'
require 'ardm/property/string'

module Ardm
  class Property
    class FilePath < String
      load_as Pathname

      length 255

      def load(value)
        Pathname.new(value) unless Ardm::Ext.blank?(value)
      end

      def dump(value)
        value.to_s unless Ardm::Ext.blank?(value)
      end

      def typecast(value)
        load(value)
      end

    end # class FilePath
  end # class Property
end # module Ardm

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ardm-0.4.0.ar427 lib/ardm/property/file_path.rb
ardm-0.4.0 lib/ardm/property/file_path.rb
ardm-0.3.2 lib/ardm/property/file_path.rb
ardm-0.3.1 lib/ardm/property/file_path.rb
ardm-0.3.0 lib/ardm/property/file_path.rb
ardm-0.2.7 lib/ardm/property/file_path.rb
ardm-0.2.6 lib/ardm/property/file_path.rb
ardm-0.2.5 lib/ardm/property/file_path.rb
ardm-0.2.4 lib/ardm/property/file_path.rb
ardm-0.2.3 lib/ardm/property/file_path.rb
ardm-0.2.2 lib/ardm/property/file_path.rb
ardm-0.2.1 lib/ardm/property/file_path.rb
ardm-0.2.0 lib/ardm/property/file_path.rb
ardm-0.1.0 lib/ardm/property/file_path.rb
ardm-0.0.1 lib/ardm/property/file_path.rb