lib/bulldog/attachment/base.rb in bulldog-0.1.1 vs lib/bulldog/attachment/base.rb in bulldog-0.2.0
- old
+ new
@@ -141,16 +141,13 @@
def run_examination
true
end
#
- # Return the value of the given attribute from an instance
- # variable set during file examination.
+ # Return the value of the given instance variable, running a
+ # file examination first if necessary.
#
- # If not set, runs a file examination first.
- #
- def from_examination(name)
- ivar = :"@#{name}"
+ def from_examination(ivar)
value = instance_variable_get(ivar) and
return value
examine
instance_variable_get(ivar)
end