lib/chemistrykit/chemist.rb in chemistrykit-3.8.0 vs lib/chemistrykit/chemist.rb in chemistrykit-3.8.1
- old
+ new
@@ -2,20 +2,21 @@
module ChemistryKit
# representation of the user object for interacting with the system under test
class Chemist
- attr_reader :key, :type, :data
+ attr_accessor :type
+ attr_reader :data, :key
def initialize(key, type)
@key = key.to_s
@type = type.to_s
@data = {}
end
def data=(data)
data.each do |key, value|
- send("#{key}=", value)
+ send("#{key}=", value) unless key == :key
end
end
# allow this object to be set with arbitrary key value data
def method_missing(name, *arguments)