Module: Leftovers::MatcherBuilders::NodeHasBlock

Defined in:
lib/leftovers/matcher_builders/node_has_block.rb

Class Method Summary collapse

Class Method Details

.build(has_block) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/leftovers/matcher_builders/node_has_block.rb', line 7

def build(has_block)
  if has_block
    Matchers::NodeHasBlock
  elsif has_block == false
    Matchers::Not.new(Matchers::NodeHasBlock)
  end
end