View Source Credo.Code.Block (Credo v1.6.3)
This module provides helper functions to analyse blocks, e.g. the block taken
by the if
macro.
Link to this section Summary
Functions
Returns true if the given ast
has an after block.
Returns a tuple {:ok, after_block} or nil for a given AST node.
Returns the after: block of a given AST node.
Returns the do: block of a given AST node.
Returns the children of the do
block of the given AST node.
Returns the children of the rescue
block of the given AST node.
Returns true if the given ast
has a do block.
Returns a tuple {:ok, do_block} or nil for a given AST node.
Returns the do: block of a given AST node.
Returns true if the given ast
has an else block.
Returns a tuple {:ok, else_block} or nil for a given AST node.
Returns the else
block of a given AST node.
Returns true if the given ast
has an rescue block.
Returns a tuple {:ok, rescue_block} or nil for a given AST node.
Returns the rescue: block of a given AST node.
Link to this section Functions
Returns true if the given ast
has an after block.
Returns a tuple {:ok, after_block} or nil for a given AST node.
Returns the after: block of a given AST node.
Returns the do: block of a given AST node.
Returns the children of the do
block of the given AST node.
Returns the children of the rescue
block of the given AST node.
Returns true if the given ast
has a do block.
Returns a tuple {:ok, do_block} or nil for a given AST node.
Returns the do: block of a given AST node.
Returns true if the given ast
has an else block.
Returns a tuple {:ok, else_block} or nil for a given AST node.
Returns the else
block of a given AST node.
Returns true if the given ast
has an rescue block.
Returns a tuple {:ok, rescue_block} or nil for a given AST node.
Returns the rescue: block of a given AST node.