Sha256: b746528e66ff84ec412d21af7f4482eb7897706e55fb4b88055e4ee98f1ac133

Contents?: true

Size: 426 Bytes

Versions: 15

Compression:

Stored size: 426 Bytes

Contents

require 'ardm/property/string'

module Ardm
  class Property
    class Binary < String

      if RUBY_VERSION >= "1.9"

        def load(value)
          super.dup.force_encoding("BINARY") unless value.nil?
        end

        def dump(value)
          value.dup.force_encoding("BINARY") unless value.nil?
        rescue
          value
        end

      end

    end # class Binary
  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/binary.rb
ardm-0.4.0 lib/ardm/property/binary.rb
ardm-0.3.2 lib/ardm/property/binary.rb
ardm-0.3.1 lib/ardm/property/binary.rb
ardm-0.3.0 lib/ardm/property/binary.rb
ardm-0.2.7 lib/ardm/property/binary.rb
ardm-0.2.6 lib/ardm/property/binary.rb
ardm-0.2.5 lib/ardm/property/binary.rb
ardm-0.2.4 lib/ardm/property/binary.rb
ardm-0.2.3 lib/ardm/property/binary.rb
ardm-0.2.2 lib/ardm/property/binary.rb
ardm-0.2.1 lib/ardm/property/binary.rb
ardm-0.2.0 lib/ardm/property/binary.rb
ardm-0.1.0 lib/ardm/property/binary.rb
ardm-0.0.1 lib/ardm/property/binary.rb