Sha256: e53276add32a19d1b49faf0991f8886ba002c13caa876f9fa79bc03b0372bb25
Contents?: true
Size: 592 Bytes
Versions: 2
Compression:
Stored size: 592 Bytes
Contents
require File.dirname(__FILE__) + '/../lib/ninja_decorators' class BeforeNinjaSubject include NinjaDecorators before_filter :common_before, [:foo, :bar, :nested] before_filter :nested_before, [:nested] attr_accessor :ret def initialize @ret = "" end def foo @ret += "foo" end def bar @ret += "bar" end def nested @ret += "nested" end private def common_before @ret += "common " yield if block_given? @ret += " around" end def nested_before @ret += "nesting " yield if block_given? @ret += " completed" end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
haruska-ninja-decorators-0.6.0 | test/before_ninja_subject.rb |
ninja-decorators-0.6.0 | test/before_ninja_subject.rb |