lib/inch/code_object/proxy/base.rb in inch-0.3.4.rc1 vs lib/inch/code_object/proxy/base.rb in inch-0.4.0.rc1
- old
+ new
@@ -22,11 +22,11 @@
attr_accessor :object_lookup
# convenient shortcuts to evalution object
def_delegators :evaluation, :score, :roles, :priority
- def initialize(attributes)
+ def initialize(attributes = {})
@attributes = attributes
end
# Returns the attribute for the given +key+
#
@@ -210,9 +210,19 @@
self[:unconsidered_tag_count]
end
def visibility
self[:visibility]
+ end
+
+ # Used to persist the code object
+ def marshal_dump
+ @attributes
+ end
+
+ # Used to load a persisted code object
+ def marshal_load(attributes)
+ @attributes = attributes
end
def inspect
"#<#{self.class.to_s}: #{fullname}>"
end