Sha256: cc82d83826fa54de758b4c56839b64a7af1df5e34c921eabe96c09a23ce780ec
Contents?: true
Size: 373 Bytes
Versions: 2
Compression:
Stored size: 373 Bytes
Contents
module Assert; end class Assert::Context; end module Assert::Context::LetDSL def let(name, &block) self.send(:define_method, name, &-> { unless instance_variable_defined?("@__assert_let_#{name}__") instance_variable_set("@__assert_let_#{name}__", instance_eval(&block)) end instance_variable_get("@__assert_let_#{name}__") }) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
assert-2.19.0 | lib/assert/context/let_dsl.rb |
assert-2.18.4 | lib/assert/context/let_dsl.rb |