anchor.diff:  default(target)    -> "Ember.TEMPLATES";
   default(compiler)  -> "Ember.Handlebars.compile";
   default(templates) -> [].
  +
  +ensure_list(Object) ->
  +    case is_binary(Object) of
  +        true ->
  +            binary_to_list(Object);
  +        false ->
  +            Object
  +    end.
   
   read(File) ->
       case file:read_file(File) of
  
positive.code: %% @spec handlebars(list(), list(), list(), list()) -> binary()
  %% @doc Generate a handlebars compiler line.
  handlebars(Name, Body, Target, Compiler) ->
      Name1 = case is_binary(Name) of true -> binary_to_list(Name); false -> Name end,
      Body1 = case is_binary(Body) of true -> binary_to_list(Body); false -> Body end,
      Targeted = lists:flatten([Target, "['" ++ Name1 ++ "']"]),
      Compiled = lists:flatten([Compiler, "('" ++ Body1 ++ "');"]),
      list_to_binary(lists:flatten([Targeted, " = " ++ Compiled])).
  
  %% ===================================================================
  
negative.code: -ifdef(TEST).
  
  handlebars_test() ->
      Expected = <<"Ember.TEMPLATES['foo'] = Ember.Handlebars.compile('<h1>bar</h1>')">>,
      ListName = "foo",
      ListBody = "<h1>bar</h1>",
      ListTarget = "Ember.TEMPLATES",
      ListCompiler = "Ember.Handlebars.compile",
      ListOutput = handlebars(ListName, ListBody, ListTarget, ListCompiler),
      ?assertEqual(Expected, ListOutput),
  
      BinaryName = list_to_binary(ListName),
      BinaryBody = list_to_binary(ListBody),
      BinaryTarget = list_to_binary(ListTarget),
      BinaryCompiler = list_to_binary(ListCompiler),
      BinaryOutput = handlebars(BinaryName, BinaryBody, BinaryTarget, BinaryCompiler),
      ?assertEqual(Expected, BinaryOutput).
  
  -endif.
  