Class: Funktional::ShouldNotBlock
- Inherits:
-
Object
- Object
- Funktional::ShouldNotBlock
- Defined in:
- lib/funktional/context/should_not_block.rb
Class Method Summary collapse
Class Method Details
.build(options, context, &blk) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/funktional/context/should_not_block.rb', line 4 def self.build(, context, &blk) if .is_a? Symbol and .eql? :send_email return ShouldNotSendEmailBlock.new(context) end case .keys.first when :create ShouldNotCreateBlock.new([:create], context) when :delete ShouldNotDeleteBlock.new([:delete], context) else raise "Unknown assertion [should_not #{.inspect}]" end end |