Sha256: f39768e7cfac0956a421c9873bfeaf56d4e98eafd5ffcb4d63cfd66e32485739

Contents?: true

Size: 277 Bytes

Versions: 2

Compression:

Stored size: 277 Bytes

Contents

module Toy
  module Extensions
    module Symbol
      def to_store(value, *)
        value.nil? ? nil : value.to_s
      end

      def from_store(value, *)
        value.nil? ? nil : value.to_sym
      end
    end
  end
end

class Symbol
  extend Toy::Extensions::Symbol
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
toystore-0.13.2 lib/toy/extensions/symbol.rb
toystore-0.13.1 lib/toy/extensions/symbol.rb