Sha256: 6ce3ece98484d0d8379e0744ee947fe459e1aec8444afe2504e810fae6bf4a98
Contents?: true
Size: 637 Bytes
Versions: 7
Compression:
Stored size: 637 Bytes
Contents
module SetBuilder class ModifierCollection < Array # def [](index) # case index # when Symbol, String # index = index.to_s # self.find {|trait| trait.name == index} # else # super # end # end def to_hash hash = {} each do |modifier| hash[Modifier.name(modifier).to_s] = modifier.to_hash end hash end def to_json to_hash.to_json end # def modifiers # inject([]) {|modifiers, trait| modifiers.concat(trait.modifiers)}.uniq # end end end
Version data entries
7 entries across 7 versions & 1 rubygems