Module: MustBe::MustOnlyEverContain::Base::ClassMethods

Defined in:
lib/must_be/containers.rb

Instance Method Summary collapse

Instance Method Details

#must_check_contents_after(*methods) ⇒ Object



153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/must_be/containers.rb', line 153

def must_check_contents_after(*methods)
  methods.each do |method|
    module_eval("      def \#{method}(*args)\n        begin\n          super\n        ensure\n          must_check_contents\n        end\n      end\n    END\n  end\nend\n", __FILE__, __LINE__ + 1)