Module: Linecook::Test::FileTest::ClassMethods
- Defined in:
- lib/linecook/test/file_test.rb
Instance Attribute Summary collapse
-
#class_dir ⇒ Object
Returns the value of attribute class_dir.
-
#cleanup_method_registry ⇒ Object
readonly
Returns the value of attribute cleanup_method_registry.
Instance Method Summary collapse
Instance Attribute Details
#class_dir ⇒ Object
Returns the value of attribute class_dir.
7 8 9 |
# File 'lib/linecook/test/file_test.rb', line 7 def class_dir @class_dir end |
#cleanup_method_registry ⇒ Object (readonly)
Returns the value of attribute cleanup_method_registry.
9 10 11 |
# File 'lib/linecook/test/file_test.rb', line 9 def cleanup_method_registry @cleanup_method_registry end |
Instance Method Details
#cleanup_methods ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/linecook/test/file_test.rb', line 11 def cleanup_methods @cleanup_methods ||= begin cleanup_methods = {} ancestors.reverse.each do |ancestor| next unless ancestor.kind_of?(ClassMethods) ancestor.cleanup_method_registry.each_pair do |key, value| if value.nil? cleanup_methods.delete(key) else cleanup_methods[key] = value end end end cleanup_methods end end |
#reset_cleanup_methods ⇒ Object
30 31 32 |
# File 'lib/linecook/test/file_test.rb', line 30 def reset_cleanup_methods @cleanup_methods = nil end |