lib/puppet/pops/model/factory.rb
# Builds body :) from different kinds of input
# @param body [nil] unchanged, produces nil
# @param body [Array<Expression>] turns into a BlockExpression
# @param body [Expression] produces the given expression
# @param body [Object] produces the result of calling #build with body as argument
Builds body :) from different kinds of input
Builds body : ) from different kinds of input
def f_build_body(body)
    case body
    when NilClass
      nil
    when Array
      Puppet::Pops::Model::Factory.new(Model::BlockExpression, *body)
    else
      build(body)
    end
  end
def f_build_body ( body ) case body when NilClass nil when Array Puppet :: Pops :: Model :: Factory . new ( Model :: BlockExpression , * body ) else build ( body ) end end
Builds body :) from different kinds of input
Builds body : ) from different kinds of input
body
produces the result of calling #build with body as argument
produces the result of calling #build with body as argument