lib/mutest/meta/example/dsl.rb
def node(input)
          case input
          when String
            Unparser::Preprocessor.run(Unparser.parse(input))
          when ::Parser::AST::Node
            input
          else
            raise "Cannot coerce to node: #{input.inspect}"
          end
        end
# Helper method to coerce input to node
#
# @param [String,Parser::AST::Node] input
#
# @return [Parser::AST::Node]
#
# @raise [RuntimeError]
#   in case input cannot be coerced
Helper method to coerce input to node
Helper method to coerce input to node
def node(input)
          case input
          when String
            Unparser::Preprocessor.run(Unparser.parse(input))
          when ::Parser::AST::Node
            input
          else
            raise "Cannot coerce to node: #{input.inspect}"
          end
        end
def node ( input ) case input when String Unparser :: Preprocessor . run ( Unparser . parse ( input ) ) when :: Parser :: AST :: Node input else raise "Cannot coerce to node: #{input.inspect}" end end
Helper method to coerce input to node
Helper method to coerce input to node
None
Parser::AST::Node
[RuntimeError] in case input cannot be coerced
[ RuntimeError ] in case input cannot be coerced
input
None