Class: Object

Inherits:
BasicObject
Defined in:
merb-core/lib/merb-core/test/test_ext/object.rb

Instance Method Summary collapse

Instance Method Details

#assigns(attr) ⇒ Object

Returns The instance variable @attr for this object.

Examples:

# In a spec
@my_obj.assigns(:my_value).should == @my_value


9
10
11
# File 'merb-core/lib/merb-core/test/test_ext/object.rb', line 9

def assigns(attr)
  self.instance_variable_get("@#{attr}")
end