Module: Test::Unit::Attribute

Included in:
TestCase
Defined in:
lib/test/unit/attribute.rb

Defined Under Namespace

Modules: BaseClassMethods, ClassMethods Classes: StringifyKeyHash

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



25
26
27
28
# File 'lib/test/unit/attribute.rb', line 25

def included(base)
  base.extend(BaseClassMethods)
  base.extend(ClassMethods)
end

Instance Method Details

#[](name) ⇒ Object



222
223
224
# File 'lib/test/unit/attribute.rb', line 222

def [](name)
  self.class.find_attribute(@method_name, name)
end

#attributesObject



218
219
220
# File 'lib/test/unit/attribute.rb', line 218

def attributes
  self.class.attributes(@method_name) || StringifyKeyHash.new
end