lib/restruct/id.rb in restruct-0.1.0 vs lib/restruct/id.rb in restruct-0.2.0

- old
+ new

@@ -1,9 +1,13 @@ module Restruct class Id < String attr_reader :separator + def self.[](id) + new id + end + def initialize(id, separator=nil) @separator = separator || Restruct.id_separator super id.to_s end \ No newline at end of file