lib/jldrill/model/Item.rb in jldrill-0.5.1.7 vs lib/jldrill/model/Item.rb in jldrill-0.6.0.1

- old
+ new

@@ -1,6 +1,6 @@ -require 'jldrill/model/items/ItemFactory' +# encoding: utf-8 require 'jldrill/model/ItemStatus' require 'jldrill/model/ProblemStatus' require 'jldrill/model/Quiz/ItemStats' module JLDrill @@ -35,11 +35,11 @@ if item.nil? @itemType = nil @contents = "" @hash = "".hash else - @itemType = item.itemType + @itemType = item.class @contents = item.to_s @hash = item.hash end @position = -1 @bin = 0 @@ -82,10 +82,10 @@ end end # Set the value of the item by parsing the string def parse(string) - @itemType = ItemFactory::find(Vocabulary) + @itemType = JLDrill::Vocabulary @contents = string parseLine(@contents) @hash = self.to_o.hash end