Sha256: 418e53c2ddb69e356f4c24ecc55d261ea8a14940060a916b1d2336741751001d
Contents?: true
Size: 428 Bytes
Versions: 44
Compression:
Stored size: 428 Bytes
Contents
module Noodall class Permalink < Array def initialize(*args) if args.length > 1 super args else super args.first.to_s.split('/') end end def to_s self.join('/') end def inspect "<Permalink #{self.to_s}>" end def self.to_mongo(value) value.to_s end def self.from_mongo(value) new( *value.to_s.split('/') ) end end end
Version data entries
44 entries across 44 versions & 1 rubygems